Renci.SshNet.Channels.ChannelForwardedTcpip.CloseSocket C# (CSharp) 메소드

CloseSocket() 개인적인 메소드

Closes the socket, hereby interrupting the blocking receive in Bind(IPEndPoint,IForwardedPort).
private CloseSocket ( ) : void
리턴 void
        private void CloseSocket()
        {
            if (_socket == null)
                return;

            lock (_socketShutdownAndCloseLock)
            {
                var socket = _socket;
                if (socket != null)
                {
                    _socket = null;
                    socket.Dispose();
                }
            }
        }