public void TearDown()
        {
            if (ServerSocket != null)
            {
                ServerSocket.Dispose();
                ServerSocket = null;
            }

            if (ServerListener != null)
            {
                ServerListener.Dispose();
                ServerListener = null;
            }

            if (Session != null)
            {
                Session.Dispose();
                Session = null;
            }

            if (ClientSocket != null && ClientSocket.Connected)
            {
                ClientSocket.Shutdown(SocketShutdown.Both);
                ClientSocket.Dispose();
            }
        }
示例#2
0
        public void TearDown()
        {
            if (ServerListener != null)
            {
                ServerListener.Dispose();
            }

            if (Session != null)
            {
                Session.Dispose();
            }
        }
        public void TearDown()
        {
            if (ServerSocket != null)
            {
                ServerSocket.Dispose();
                ServerSocket = null;
            }

            if (ServerListener != null)
            {
                ServerListener.Dispose();
                ServerListener = null;
            }

            if (Session != null)
            {
                Session.Dispose();
                Session = null;
            }
        }