System.Net.Sockets.TcpListener.TcpListener C# (CSharp) Method

TcpListener() public method

public TcpListener ( IPEndPoint localEP ) : System
localEP IPEndPoint
return System
        public TcpListener(IPEndPoint localEP)
        {
            if (NetEventSource.IsEnabled) NetEventSource.Enter(this, localEP);
            if (localEP == null)
            {
                throw new ArgumentNullException(nameof(localEP));
            }
            _serverSocketEP = localEP;
            _serverSocket = new Socket(_serverSocketEP.AddressFamily, SocketType.Stream, ProtocolType.Tcp);
            if (NetEventSource.IsEnabled) NetEventSource.Exit(this);
        }

Same methods

TcpListener::TcpListener ( IPAddress localaddr, int port ) : System
TcpListener::TcpListener ( int port ) : System