This commit is contained in:
as2252258@163.com
2021-07-11 04:52:28 +08:00
parent bd1a34985b
commit b30abb50d5
3 changed files with 1 additions and 5 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ use Swoole\Server;
class OnClose extends Callback class OnClose extends Callback
{ {
/** /**
* @param Server $server * @param Server $server
-1
View File
@@ -405,7 +405,6 @@ class Server extends HttpService
$this->onBindCallback($server, 'connect', $config['events'][Event::SERVER_ON_CONNECT] ?? [make(OnConnect::class), 'onHandler']); $this->onBindCallback($server, 'connect', $config['events'][Event::SERVER_ON_CONNECT] ?? [make(OnConnect::class), 'onHandler']);
$this->onBindCallback($server, 'close', $config['events'][Event::SERVER_ON_CLOSE] ?? [make(OnClose::class), 'onHandler']); $this->onBindCallback($server, 'close', $config['events'][Event::SERVER_ON_CLOSE] ?? [make(OnClose::class), 'onHandler']);
$this->onBindCallback($server, 'receive', $config['events'][Event::SERVER_ON_RECEIVE] ?? [make(OnReceive::class), 'onHandler']); $this->onBindCallback($server, 'receive', $config['events'][Event::SERVER_ON_RECEIVE] ?? [make(OnReceive::class), 'onHandler']);
$server->on('connect', $http);
} else if ($config['type'] === self::HTTP) { } else if ($config['type'] === self::HTTP) {
$this->onBindCallback($server, 'request', $config['events'][Event::SERVER_ON_REQUEST] ?? [make(OnRequest::class), 'onHandler']); $this->onBindCallback($server, 'request', $config['events'][Event::SERVER_ON_REQUEST] ?? [make(OnRequest::class), 'onHandler']);
$server->on('connect', $http); $server->on('connect', $http);
-3
View File
@@ -33,9 +33,6 @@ class Websocket extends HAWebsocket
*/ */
public function onBaseListener() public function onBaseListener()
{ {
$this->on('connect', function () {
});
$this->on('handshake', $this->createHandler('handshake')); $this->on('handshake', $this->createHandler('handshake'));
$this->on('message', $this->createHandler('message')); $this->on('message', $this->createHandler('message'));
$this->on('close', $this->createHandler('close')); $this->on('close', $this->createHandler('close'));