This commit is contained in:
2020-12-15 17:26:07 +08:00
parent 7917d32ec9
commit 0281b4c197
4 changed files with 9 additions and 4 deletions
+1 -1
View File
@@ -58,7 +58,7 @@ class OnClose extends Callback
}
$node = $router->search('/' . Socket::CLOSE . '::event', 'sw::socket');
if ($node instanceof Node) {
$node->dispatch();
$node->dispatch($server, $fd);
}
} catch (\Throwable $exception) {
$this->addError($exception);
+1 -1
View File
@@ -102,7 +102,7 @@ class OnHandshake extends Callback
if ($node === null) {
return $this->disconnect($response, 502);
}
return $node->dispatch();
return $node->dispatch($request, $response);
} catch (\Throwable $exception) {
$this->addError($exception->getMessage());
return $this->disconnect($response, 500);
+1 -1
View File
@@ -68,7 +68,7 @@ class OnMessage extends Callback
if ($node === null) {
throw new Exception('Page not found.');
}
return $node->dispatch();
return $node->dispatch($server, $frame);
}
}