Пример #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;
     }
 }
Пример #3
0
 public EventDispatcher()
 {
     m_cDispatcher = new EDynamicDispatcher();
 }