ProxySocket.Connect Method (String, Int32)

Mentalis.org ProxySocket

Mentalis.org 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 _
)
[C#]
public void Connect(
   string host,
   int port
);

Parameters

host
The remote host to connect to.
port
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

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