Establishes a connection to a remote device.

Namespace: Jscape.Util.Proxy
Assembly: Jscape.Email (in Jscape.Email.dll) Version: 2.4.5.0

Syntax

C#
public void Connect(
	string host,
	int port
)
Visual Basic
Public Sub Connect ( _
	host As String, _
	port As Integer _
)
Visual C++
public:
void Connect(
	String^ host, 
	int port
)

Parameters

host
Type: System..::..String
The remote host to connect to.
port
Type: System..::..Int32
The remote port to connect to.

Remarks

If you use this method with a SOCKS4 server, it will let the server resolve the hostname. Not all SOCKS4 servers support this 'remote DNS' though.

Exceptions

ExceptionCondition
System..::..ArgumentNullExceptionThe host parameter is a null reference (Nothing in Visual Basic).
System..::..ArgumentExceptionThe port parameter is invalid.
System.Net.Sockets..::..SocketExceptionAn operating system error occurs while accessing the Socket.
System..::..ObjectDisposedExceptionThe Socket has been closed.
Jscape.Util.Proxy..::..ProxyExceptionAn error occured while talking to the proxy server.

See Also