From 53c44c1ad6d16e297cd08aa967a0f84903b6807f Mon Sep 17 00:00:00 2001 From: inhere Date: Sat, 14 Apr 2018 11:53:33 +0800 Subject: [PATCH] add server type option on before server start. --- src/WebSocketServer.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/WebSocketServer.php b/src/WebSocketServer.php index da8de82b..66db909b 100644 --- a/src/WebSocketServer.php +++ b/src/WebSocketServer.php @@ -42,6 +42,9 @@ public function initSettings(array $settings) */ public function start() { + // add server type + $this->serverSetting['server_type'] = self::TYPE_WS; + if (!empty($this->setting['open_http2_protocol'])) { $this->wsSettings['type'] = SWOOLE_SOCK_TCP | SWOOLE_SSL; }