From 34eb2ad914825a4b212e8c33b85fa74842d9a534 Mon Sep 17 00:00:00 2001 From: zhujunjie Date: Wed, 6 Mar 2019 14:05:03 +0800 Subject: [PATCH] Update network.js --- fc/js/network.js | 656 +++++++++++++++++++++++------------------------ 1 file changed, 328 insertions(+), 328 deletions(-) diff --git a/fc/js/network.js b/fc/js/network.js index cad99cc..d45ff1a 100644 --- a/fc/js/network.js +++ b/fc/js/network.js @@ -1,328 +1,328 @@ -var jsMatchvs = JCMatchVS -var jcmsghandler = JCMsgHandler - - - -nwm = function(){ - this.response = null; - this.online = false; - this.engine = null; - this.roomUserInfoList = []; - this.frames=[]; - this.inRoom = false; - - - this.cleanCb = function(){ - this.cbOnLogin = null; - this.cbOnCreateRoom =null; - this.cbOnJoinRoom = null; - this.cbjoinRoomNotify = null; - this.cbleaveRoomNotify = null; - this.cbRoomMerge = null; - }; - this.clean = function(){ - this.online = false; - this.frameIndex = 0; - this.cleanCb(); - this.roomUserInfoList = []; - if(this.engine){ - this.engine.loginOut(); - this.engine.reconnectcount = 999; - this.engine.disconnect(); - this.engine = null; - } - - } - this.init = function(){ - var response = new jcmsghandler(); - NetWorkHandle.NetWorkManage = this; - var self = this; - response.initResponse = function(res){ - if(res.status==0){ - self.engine.login(); - } - } - response.netResponse = function(res){ - if(res.status==0){ - console.log('net 成功'); - } - } - response.joinRoomResponse= function(res){ - // console.log(res); - // if(res.status==0||res.status==-3){ - // for(var i=0;i