现在web端和小游戏已经弄好,证书是阿里云的证书,现在要打包native,一直没找到怎么wss协议的方法,使用
var url = cc.url.raw(‘resources/cert.pem’);
this.ws = new WebSocket(turl,{},url);
只是返回错误1,是链接无效。
我是不是哪里漏了官方的文档,
后面我发现是这样的,
本地证书(wss://127.0.0.1) web连接(可以) native(可以)
阿里云证书(wss://xxx.com) web连接(可以) native(不可以)