diff --git a/HttpServer/Service/Websocket.php b/HttpServer/Service/Websocket.php index 0e52b7e6..8df20856 100644 --- a/HttpServer/Service/Websocket.php +++ b/HttpServer/Service/Websocket.php @@ -8,29 +8,37 @@ use ReflectionException; use Snowflake\Exception\NotFindClassException; use HttpServer\Service\Abstracts\Websocket as HAWebsocket; + +/** + * Class Websocket + * @package HttpServer\Service + */ class Websocket extends HAWebsocket { - /** - * @throws ReflectionException - * @throws NotFindClassException - */ - public function onInit() - { - $this->onHandlerListener(); - $this->onBaseListener(); - } + /** + * @throws ReflectionException + * @throws NotFindClassException + */ + public function onInit() + { + $this->onHandlerListener(); + $this->onBaseListener(); + } - /** - * @throws NotFindClassException - * @throws ReflectionException - */ - public function onBaseListener() - { - $this->on('handshake', $this->createHandler('handshake')); - $this->on('message', $this->createHandler('message')); - $this->on('close', $this->createHandler('close')); - } + /** + * @throws NotFindClassException + * @throws ReflectionException + */ + public function onBaseListener() + { + $this->on('connect', function () { + + }); + $this->on('handshake', $this->createHandler('handshake')); + $this->on('message', $this->createHandler('message')); + $this->on('close', $this->createHandler('close')); + } }