workerman 作为客户端去请求 websocket 时能修改下面请求握手参数吗?

Alu

Upgrade: websocket
Connection: Upgrade
Host: example.com
Origin: http://example.com
Sec-WebSocket-Key: sN9cRrP/n9NdMgdcy2VJFQ==
Sec-WebSocket-Version: 13

握手的时候要在Sec-WebSocket-Protocol: 增加一个参数

2153 1 0
1个回答

phpcreeper
$ws_connection->onConnect = function($connection){
    $connection->WSClientProtocol = '子协议1,子协议2,...,子协议N';
};
年代过于久远,无法发表回答
×
🔝