Establishes a connection to a remote device.

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

Syntax

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

Parameters

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

Implements

ISocket..::..Connect(String, Int32)

Remarks

The Connect method establishes a network connection to a host identified by the serverName and serverPort parameters. 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.

Version Information

.NET Compact Framework

Supported in: 3.9, 3.5

See Also