Establishes a connection to a remote device.

Namespace:  Rebex.Net
Assembly:  Rebex.Tls (in Rebex.Tls.dll)

Syntax

Visual Basic
Public Sub Connect ( _
	serverName As String, _
	port As Integer _
)
C#
public void Connect(
	string serverName,
	int port
)

Parameters

serverName
Type: System..::..String
The hostname (or IP address) of the remote device.
port
Type: System..::..Int32
The port number associated with the hostname.

Remarks

The Connect(String, Int32) method establishes a network connection to a host identified by the serverName and port parameters. Once the connection has been made, you can send data to the remote device with the Send(ArraySegment<(Of <<'(Byte>)>>)) method, or receive data from the remote device with the Receive(ArraySegment<(Of <<'(Byte>)>>)) method.

Version Information

.NET Compact Framework

Supported in: 3.9, 3.5

See Also