Пример #1
0
 public static void Disconnect(bool flush)
 {
     Engine.ClearPings();
     m_Decompress = false;
     m_CurrFilled = 0;
     if (flush)
     {
         Flush();
     }
     if (m_Server != null)
     {
         try
         {
             m_Server.Shutdown(SocketShutdown.Both);
         }
         catch
         {
         }
         try
         {
             m_Server.Close();
         }
         catch
         {
         }
         m_Server = null;
     }
 }