예제 #1
0
        public void Destroy()
        {
            try
            {
                if (TcpClient != null && TcpClient.Client != null)
                {
                    TcpClient.Client.Close();
                    TcpClient = null;
                }

                if (RestartableStream != null)
                {
                    RestartableStream.Close();
                    RestartableStream = null;
                }
                if (Stream != null)
                {
                    Stream.Close();
                    Stream = null;
                }
                Buffer = null;
            }
            catch
            {
            }
        }
예제 #2
0
        public void Destroy()
        {
            try
            {
                TcpClient?.Client?.Close();
                TcpClient = null;

                RestartableStream?.Close();
                RestartableStream = null;

                Stream?.Close();
                Stream = null;

                Buffer = null;
            }
            catch
            {
                // ignored
            }
        }
예제 #3
0
        public void Destroy()
        {
            try
            {
                TcpClient?.Client?.Close();
                TcpClient = null;

                RestartableStream?.Close();
                RestartableStream = null;

                Stream?.Close();
                Stream = null;

                Buffer = null;
            }
            catch
            {
                // ignored
            }
        }