ComponentSpace Proxy Class Library Reference

ProxyClientBase.Connect Method 

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

[Visual Basic]
Overridable Public Function Connect( _
   ByVal serverAddress As String, _
   ByVal serverPort As Integer, _
   ByVal userName As String, _
   ByVal password As String _
) As TcpClient _
    Implements IProxyClient.Connect
[C#]
public virtual TcpClient Connect(
   string serverAddress,
   int serverPort,
   string userName,
   string password
);

Parameters

serverAddress
The destination server address (eg. 66.210.153.11 or www.myserver.com).
serverPort
The destination server port number.
userName
The user ID or null.
password
The password or null.

Return Value

The TcpClient to use to communicate with the destination server.

Implements

IProxyClient.Connect

Exceptions

Exception Type Condition
ProxyException Thrown if the connect fails.

See Also

ProxyClientBase Class | ComponentSpace.Proxy Namespace