예제 #1
0
 public NetChannel(NetChannelType type, SocketClient socketClient)
 {
     m_eChannelType  = type;
     m_queueRecvData = new Queue <NetRecvData>();
     m_cSocketClient = socketClient;
     m_cSocketClient.OnDisConnect += OnDisConnect;
     m_dicServerMsg   = new Dictionary <short, List <IServerMsg> >();
     m_cMsgDispatcher = new EDynamicDispatcher();
     m_cFrameData     = new NetFrameData();
     LoadNetMessageEvent();
 }
예제 #2
0
 public void Dispose()
 {
     m_cSocketClient.Dispose();
     m_cSocketClient = null;
     if (m_cMsgDispatcher != null)
     {
         m_cMsgDispatcher.Clear();
         m_cMsgDispatcher = null;
     }
     if (m_cFrameData != null)
     {
         m_cFrameData.Clear();
         m_cFrameData = null;
     }
 }