版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/themagickeyjianan/article/details/87721604
send: function (message) {
if (!this._ws || !cc.sys.isObjectValid(this._ws) || (this._ws.readyState !== WebSocket.OPEN)) {
return;
}
//
this._ws.send(JSON.stringify(message));
},