示例#1
0
 protected void Dispose(bool disposing)
 {
     // Check to see if Dispose has already been called.
     if (!m_Disposed)
     {
         // If disposing equals true, dispose all managed
         // and unmanaged resources.
         if (disposing)
         {
             // Dispose managed resources.
             PacketFarmer          = null;
             m_Connbuffer          = null;
             m_MessageHandlers     = null;
             m_MessageHandlersDict = null;
             m_socket    = null;
             tcpEndPoint = null;
         }
     }
     m_Disposed = true;
 }
示例#2
0
 internal void SetHandlers(JHSNetworkMessageHandlers handlers)
 {
     m_MessageHandlers     = handlers;
     m_MessageHandlersDict = handlers.GetHandlers();
 }
示例#3
0
 public JHSServer(JHSNetworkMessageHandlers m_MessageHandlersx)
 {
     m_MessageHandlers.ClearMessageHandlers();
     m_MessageHandlers = m_MessageHandlersx;
 }
示例#4
0
 public JHSClient(JHSNetworkMessageHandlers m_MessageHandlersx)
 {
     RecconectTry = NetConfig.ReconnectAttempts;
     m_MessageHandlers.ClearMessageHandlers();
     m_MessageHandlers = m_MessageHandlersx;
 }