ComponentSpace Proxy Class Library Reference

Socks4Client.Connect Method (String, Int32)

Connects to the proxy server and, if successful, a TcpClient is returned for communications with the destination server.

[Visual Basic]
Overloads Public Function Connect( _
   ByVal serverAddress As String, _
   ByVal serverPort As Integer _
) As TcpClient
[C#]
public TcpClient Connect(
   string serverAddress,
   int serverPort
);

Parameters

serverAddress
The destination server address (eg. 66.210.153.11 or www.myserver.com).
serverPort
The destination server port number.

Return Value

The TcpClient to use to communicate with the destination server.

Exceptions

Exception Type Condition
ProxyException Thrown if the connect fails.

See Also

Socks4Client Class | ComponentSpace.Proxy.Socks4 Namespace | Socks4Client.Connect Overload List