Establishes a connection to a remote device.
Namespace: Jscape.Util.ProxyAssembly: 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
Exception | 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. |
Jscape.Util.Proxy..::..ProxyException | An error occured while talking to the proxy server. |