示例#1
0
        /// <exception cref="System.IO.IOException"></exception>
        protected internal override void DoDisconnect(bool hard)
        {
            try
            {
                if (Sessions != null)
                {
                    foreach (var ssn in Sessions)
                    {
                        ssn?.Logoff(hard);
                    }
                }

                Out?.Close();
                In?.Close();

                //Socket.`Close` method deleted
                //Socket.Close();
                Socket?.Shutdown(SocketShutdown.Both);
                Socket?.Dispose();
            }
            finally
            {
                Digest       = null;
                Socket       = null;
                TconHostName = null;
            }
        }
示例#2
0
 protected override void Shutdown()
 {
     _socket.Shutdown(SocketShutdown.Both);
 }