SystemExt/Network/TCPClient.cs
/// <summary>
/// Attempt to connect to the specified remote server.
/// </summary>
/// <param name="host">
/// Hostname or IP address to connect to.
/// </param>
/// <param name="port">
/// TCP port to connect to.
/// </param>
/// <returns>
/// A new instance of the <see cref="TClient"/> class which represents the connection.
/// </returns>
Attempt to connect to the specified remote server.
Attempt to connect to the specified remote server .
public static TClient Connect(string host, ushort port)
        {
            IPAddress address;
            if (IPAddress.TryParse(host, out address))
                return TCPClient<TClient>.Connect(new IPEndPoint(address, port));
            var client = new TClient();
            Dns.BeginGetHostAddresses(host, client.EndGetHostAddresses, port);
            return client;
        }
public static TClient Connect ( string host , ushort port ) { IPAddress address ; if ( IPAddress . TryParse ( host , out address ) ) return TCPClient < TClient > . Connect ( new IPEndPoint ( address , port ) ) ; var client = new TClient ( ) ; Dns . BeginGetHostAddresses ( host , client . EndGetHostAddresses , port ) ; return client ; }
Attempt to connect to the specified remote server.
Attempt to connect to the specified remote server .
A new instance of the  class which represents the connection.
A new instance of the class which represents the connection .
host
string
Hostname or IP address to connect to.
Hostname or IP address to connect to .
port
ushort
TCP port to connect to.
TCP port to connect to .