Establishes a connection to a remote device.
[Visual Basic]
Overridable Public Sub Connect( _
ByVal remoteEP As EndPoint _
)
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.
Exception Type | Condition |
---|---|
ArgumentNullException | remoteEP is a null reference (Nothing in Visual Basic). |
SocketException | An operating system error occurs while accessing the VirtualSocket. |
ObjectDisposedException | The VirtualSocket has been closed. |
VirtualSocket Class | VirtualSocket Members | Org.Mentalis.Security.Ssl Namespace