大约有 5 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0021 秒)
...ocket.on(Event.CLOSE, this, onSocketClose); socket.on(Event.MESSAGE, this, onMessageReveived); socket.on(Event.ERROR, this, onConnectError); socket.connectByUrl(url); } public function Add(handler:IHandler):void { if(list.indexOf(handler) < 0){ list.push(handler); } } public function Remove(handl...
来源: Laya_社区 发布时间: 20170724
...on(){ function BKWebSocket(url){ this._socket=null; this.onopen=null; this.onmessage=null; this.onclose=null; this.onerror=null; this._socket=new BK.WebSocket(url); var _self; _self=this; this._socket.onClose=function (ws){ if (_self.onclose !=null){ _self.onclose(); } } this._socket.onOpen=function...
来源: Laya_社区 发布时间: 20180328
...onnect success~"); ws.send('tom'); alert("send to server msg: tom"); }; ws.onmessage = function(e) { alert("accpet msg: " + e.data); }; ws.onerror = function(e) { alert("error: " + e); console.log(e) }; </script> </body> </html> 这是app设置的url所对应的html文件,在w...
来源: Laya_社区 发布时间: 20181018
...til.UTF_8); int len = b.length; bf.writeInt(len); bf.writeBytes(b); js: ws.onmessage = function (e) { var view=new DataView(e.data); console.log(view.byteLength);//7 console.log(view.getInt32(0));//3 console.log(view.getInt8(4),view.getInt8(5),view.getInt8(6));// -28 -67 -96 console.log(new Uint8Arr...
来源: Laya_社区 发布时间: 20180302
...RROR, this, this.onIOError); this.socket.on(Laya.Event.MESSAGE, this, this.onMessage); this.socket.connect(host,port); } public on(event, fn){ (this._callbacks[event] = this._callbacks[event] || []).push(fn); } public request(route, msg, cb) { if(arguments.length === 2 && typeof msg === 'fun...
来源: Laya_社区 发布时间: 20180119