Пример #1
0
 public void Close(bool keepCurrConn)
 {
     Trace(EventType.Data,
           "Closing socket client {0}",
           RemoteEndPoint);
     m_Terminate = true;
     m_ReconnectSignal.Set();
     if (!keepCurrConn)
     {
         m_SocketConn?.Close();
     }
 }
Пример #2
0
 public void Close()
 {
     Trace(EventType.Full, string.Format("{0} - CIP conn. will be closed", LOG_TAG));
     m_ScktConn.Close();
     m_Terminate = true;
     m_ThreadResetEvent.Set();
 }
Пример #3
0
 public void CloseConnection(SocketConn scktConn)
 {
     scktConn.Close();
     if (m_ConnList.TryRemove(scktConn, out SocketConn removed))
     {
         Trace(EventType.Data,
               "Removed connection {0} from the socket server connection list",
               removed);
     }
     else
     {
         Trace(EventType.Exception,
               "Removing connection from the socket server connection list: {0}",
               scktConn);
     }
 }