示例#1
0
 /// <summary>
 /// Stop the listener
 /// </summary>
 /// <exception cref="SocketException"></exception>
 public void Stop()
 {
     _shutdown = true;
     _factory.Shutdown();
     _listener.Stop();
     if (!_shutdownEvent.WaitOne())
     {
         _logWriter.Write(this, LogPrio.Error, "Failed to shutdown listener properly.");
     }
     _listener = null;
 }
示例#2
0
 /// <summary>
 /// Stop the listener
 /// </summary>
 /// <exception cref="SocketException"></exception>
 public void Stop()
 {
     m_shutdown = true;
     m_contextFactory.Shutdown();
     m_listener.Stop();
     if (!m_shutdownEvent.WaitOne())
     {
         m_logWriter.Write(this, LogPrio.Error, "Failed to shutdown listener properly.");
     }
     m_listener = null;
     Dispose();
 }