ProxySocket.Connect Method (String, Int32) ProxySocket ProxySocket Documentation

ProxySocket.Connect Method (String, Int32)

Establishes a connection to a remote device.

[Visual Basic]Overloads Public Sub Connect( _
   ByVal host As String, _
   ByVal port As Integer _
public void Connect(
   string host,
   int port


The remote host to connect to.
The remote port to connect to.


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.


Exception Type Condition
System.ArgumentNullException The host parameter is a null reference (Nothing in Visual Basic).
System.ArgumentException The port parameter is invalid.
System.Net.Sockets.SocketException An operating system error occurs while accessing the Socket.
System.ObjectDisposedException The Socket has been closed.
Org.Mentalis.Network.ProxySocket.ProxyException An error occured while talking to the proxy server.

See Also

ProxySocket Class | ProxySocket Members | Org.Mentalis.Network.ProxySocket Namespace | ProxySocket.Connect Overload List