See Also: TcpClient Members
The System.Net.Sockets.TcpClient class provides simple methods for connecting, sending, and receiving stream data over a network in synchronous blocking mode.
In order for System.Net.Sockets.TcpClient to connect and exchange data, a System.Net.Sockets.TcpListener or System.Net.Sockets.Socket created with the TCP System.Net.Sockets.ProtocolType must be listening for incoming connection requests. You can connect to this listener in one of the following two ways:
Create a System.Net.Sockets.TcpClient and call one of the three available TcpClient.Connect(string, int) methods.
Create a System.Net.Sockets.TcpClient using the host name and port number of the remote host. This constructor will automatically attempt a connection.
If you want to send connectionless datagrams in synchronous blocking mode, use the System.Net.Sockets.UdpClient class.