wx.connectSocket wss协议下 无法接连

发布于 7 年前作者 xiulan899961 次浏览最后编辑 7 年前来自 ask

wx.connectSocket wss协议下 真机无法接连提示’draft refuses handshakeNot Found’ ,请问大神如何解决?

问题解决方法

通过包分析真机缺少‘Sec-WebSocket-Protocol’

wx.connectSocket({

        url: this._host,

        header: {

          ‘Sec-WebSocket-Protocol’: this._protocols    //need add this

        },

        protocols: this._protocols,

      });

0 回复
暂无回复