Example #1
0
 public void Init(IRoomMsgHandler msgHandler)
 {
     _maxMsgId        = (byte)System.Math.Min((int)EMsgSC.EnumCount, (int)byte.MaxValue);
     _allMsgDealFuncs = new DealNetMsg[_maxMsgId];
     _allMsgParsers   = new ParseNetMsg[_maxMsgId];
     Debug            = new DebugInstance("Client " + ": ");
     RegisterMsgHandlers();
     _handler = msgHandler;
 }
Example #2
0
 public void Init(IRoomMsgHandler msgHandler)
 {
     _maxMsgId        = (byte)System.Math.Min(48, 255);
     _allMsgDealFuncs = new DealNetMsg[_maxMsgId];
     _allMsgParsers   = new ParseNetMsg[_maxMsgId];
     RegisterMsgHandlers();
     _handler = msgHandler;
     _netUdp  = (_netTcp = new NetClient());
     _netTcp.DoStart();
     _netTcp.NetMsgHandler = OnNetMsg;
 }
 public void Init(IRoomMsgHandler msgHandler)
 {
     _maxMsgId        = (byte)System.Math.Min((int)EMsgSC.EnumCount, (int)byte.MaxValue);
     _allMsgDealFuncs = new DealNetMsg[_maxMsgId];
     _allMsgParsers   = new ParseNetMsg[_maxMsgId];
     RegisterMsgHandlers();
     _handler = msgHandler;
     _netUdp  = _netTcp = new NetClient();//TODO Login
     _netTcp.DoStart();
     _netTcp.NetMsgHandler = OnNetMsg;
 }