Mentalis.org Security Library documentation

VirtualSocket.Connect Method 

Establishes a connection to a remote device.

[Visual Basic]
Overridable Public Sub Connect( _
   ByVal remoteEP As EndPoint _
)
[C#]
public virtual void Connect(
   EndPoint remoteEP
);

Parameters

remoteEP
An EndPoint that represents the remote device.

Remarks

The Connect method establishes a network connection between LocalEndPoint and the device identified by remoteEP. Once the connection has been made, you can send data to the remote device with the Send method, or receive data from the remote device with the Receive method.

Exceptions

Exception TypeCondition
ArgumentNullExceptionremoteEP is a null reference (Nothing in Visual Basic).
SocketExceptionAn operating system error occurs while accessing the VirtualSocket.
ObjectDisposedExceptionThe VirtualSocket has been closed.

See Also

VirtualSocket Class | VirtualSocket Members | Org.Mentalis.Security.Ssl Namespace