June 2006
Intermediate to advanced
1344 pages
42h 52m
English
There are four steps to creating a simple TCP client. First, we create an object of class TcpClient (namespace System.Net.Sockets) to connect to the server. The connection is established by calling TcpClient method Connect. One overloaded version of this method takes two arguments—the server’s IP address and its port number—as in:
Dim client As New TcpClient() client.Connect(serverAddress, serverPortNumber)
The serverPortNumber is an Integer that represents the port number to which the server application is bound to listen for connection requests. The serverAddress can be either an IPAddress instance that encapsulates the server’s IP address or a String that specifies the server’s ...
Read now
Unlock full access