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

TcpClient() public method

public TcpClient ( IPEndPoint localEP )
localEP IPEndPoint
        public TcpClient(IPEndPoint localEP)
        {
            if (NetEventSource.IsEnabled) NetEventSource.Enter(this, localEP);

            if (localEP == null)
            {
                throw new ArgumentNullException(nameof(localEP));
            }

            // IPv6: Establish address family before creating a socket
            _family = localEP.AddressFamily;

            InitializeClientSocket();
            Client.Bind(localEP);

            if (NetEventSource.IsEnabled) NetEventSource.Exit(this);
        }

Same methods

TcpClient::TcpClient ( string hostname, int port )
TcpClient::TcpClient ( ) : System.Diagnostics
TcpClient::TcpClient ( AddressFamily family ) : System.Diagnostics
TcpClient::TcpClient ( Socket acceptedSocket ) : System.Diagnostics