Begins an asynchronous request for a connection to a network device.

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

Syntax

Visual Basic
Public Function BeginConnect ( _
	serverName As String, _
	serverPort As Integer, _
	callback As AsyncCallback, _
	state As Object _
) As IAsyncResult
C#
public IAsyncResult BeginConnect(
	string serverName,
	int serverPort,
	AsyncCallback callback,
	Object state
)

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.
callback
Type: System..::..AsyncCallback
The AsyncCallback delegate.
state
Type: System..::..Object
An object containing state information for this request.

Return Value

An IAsyncResult that references the asynchronous connection.

Implements

ISocketExt..::..BeginConnect(String, Int32, AsyncCallback, Object)

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