Upgrade: websocket Connection: Upgrade Host: example.com Origin: http://example.com Sec-WebSocket-Key: sN9cRrP/n9NdMgdcy2VJFQ== Sec-WebSocket-Version: 13
握手的时候要在Sec-WebSocket-Protocol: 增加一个参数
$ws_connection->onConnect = function($connection){ $connection->WSClientProtocol = '子协议1,子协议2,...,子协议N'; };
感谢!
感谢!