改名
This commit is contained in:
@@ -56,7 +56,7 @@ class OnClose extends Callback
|
|||||||
if (!($server instanceof WServer) || !$server->isEstablished($fd)) {
|
if (!($server instanceof WServer) || !$server->isEstablished($fd)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$node = $router->search(Socket::CLOSE . '::event', 'sw::socket');
|
$node = $router->search('/' . Socket::CLOSE . '::event', 'sw::socket');
|
||||||
if ($node instanceof Node) {
|
if ($node instanceof Node) {
|
||||||
$node->dispatch();
|
$node->dispatch();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -98,8 +98,7 @@ class OnHandshake extends Callback
|
|||||||
$this->resolveParse($request, $response);
|
$this->resolveParse($request, $response);
|
||||||
|
|
||||||
$router = Snowflake::app()->getRouter();
|
$router = Snowflake::app()->getRouter();
|
||||||
$node = $router->search(Socket::HANDSHAKE . '::event', 'sw::socket');
|
$node = $router->search('/' . Socket::HANDSHAKE . '::event', 'sw::socket');
|
||||||
var_dump($node);
|
|
||||||
if ($node === null) {
|
if ($node === null) {
|
||||||
return $this->disconnect($response, 502);
|
return $this->disconnect($response, 502);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ class OnMessage extends Callback
|
|||||||
throw new Exception('Format error.');
|
throw new Exception('Format error.');
|
||||||
}
|
}
|
||||||
$router = Snowflake::app()->getRouter();
|
$router = Snowflake::app()->getRouter();
|
||||||
$node = $router->search(Socket::MESSAGE . '::' . $route, 'sw::socket');
|
$node = $router->search('/' . Socket::MESSAGE . '::' . $route, 'sw::socket');
|
||||||
if ($node === null) {
|
if ($node === null) {
|
||||||
throw new Exception('Page not found.');
|
throw new Exception('Page not found.');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -71,7 +71,6 @@ class Node extends Application
|
|||||||
} else if ($handler != null && !is_callable($handler, true)) {
|
} else if ($handler != null && !is_callable($handler, true)) {
|
||||||
$this->_error = 'Controller is con\'t exec.';
|
$this->_error = 'Controller is con\'t exec.';
|
||||||
} else {
|
} else {
|
||||||
var_dump($this);
|
|
||||||
$this->handler = $handler;
|
$this->handler = $handler;
|
||||||
}
|
}
|
||||||
return $this->restructure();
|
return $this->restructure();
|
||||||
|
|||||||
Reference in New Issue
Block a user