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

0

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


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

已邀请:

blogdaren - 乐于分享的PHP码农【http://www.blogdaren.com】

赞同来自: Alu

$ws_connection->onConnect = function($connection){
$connection->WSClientProtocol = '子协议1,子协议2,...,子协议N';
};

要回复问题请先登录注册