Mentalis.org Security Library documentation

SecureTcpClient.Connect Method (IPAddress, Int32)

Connects the client to a remote TCP host using the specified IP address and port number.

[Visual Basic]
Overridable Overloads Public Sub Connect( _
   ByVal address As IPAddress, _
   ByVal port As Integer _
)
[C#]
public virtual void Connect(
   IPAddress address,
   int port
);

Parameters

address
The IP address of the host to which you intend to connect.
port
The port number to which you intend to connect.

Exceptions

Exception TypeCondition
ArgumentNullExceptionThe address parameter is a null reference (Nothing in Visual Basic).
ArgumentOutOfRangeExceptionport is less than MinPort -or- port is greater than MaxPort.
SocketExceptionAn operating system error occurs while accessing the Socket.
ObjectDisposedExceptionThe SecureSocket has been closed.
SecurityExceptionThe security negotiation failed.

See Also

SecureTcpClient Class | Org.Mentalis.Security.Ssl Namespace | SecureTcpClient.Connect Overload List