public NetworkConnection() { asyncrec = new AsyncCallback(EndReceive); asyncsend = new AsyncCallback(EndSend); PacketFarmer = new PacketFarmer(); m_Connbuffer = new byte[1024]; NetworkEncoder = new NetworkEncoder(); }
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; }