Rebex
Products Downloads Buy Support Contact
Show / Hide Table of Contents

TlsClientSocket.BeginConnect Method

Namespace: Rebex.Net
Assembly: Rebex.Tls.dll (version 7.0.9147)

BeginConnect(EndPoint, AsyncCallback, Object)

Establishes a connection to a remote device.

Declaration
public IAsyncResult BeginConnect(EndPoint remoteEP, AsyncCallback callback, object state)
Parameters
Type Name Description
EndPoint remoteEP

An EndPoint that represents the remote device.

AsyncCallback callback

The AsyncCallback delegate.

Object state

An object containing state information for this request.

Returns
Type Description
IAsyncResult

An IAsyncResult that references the asynchronous connection.

Remarks

The BeginConnect(EndPoint, AsyncCallback, Object) method establishes a network connection to a device identified by the remoteEP parameter. Once the connection has been made, you can send data to the remote device with the BeginSend(Byte[], Int32, Int32, SocketFlags, AsyncCallback, Object) method, or receive data from the remote device with the BeginReceive(Byte[], Int32, Int32, SocketFlags, AsyncCallback, Object) method.

BeginConnect(String, Int32, AsyncCallback, Object)

Establishes a connection to a remote device.

Declaration
public IAsyncResult BeginConnect(string serverName, int port, AsyncCallback callback, object state)
Parameters
Type Name Description
String serverName

The hostname (or IP address) of the remote device.

Int32 port

The port number associated with the hostname.

AsyncCallback callback

The AsyncCallback delegate.

Object state

An object containing state information for this request.

Returns
Type Description
IAsyncResult

An IAsyncResult that references the asynchronous connection.

Remarks

The BeginConnect(String, Int32, AsyncCallback, Object) 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 BeginSend(Byte[], Int32, Int32, SocketFlags, AsyncCallback, Object) method, or receive data from the remote device with the BeginReceive(Byte[], Int32, Int32, SocketFlags, AsyncCallback, Object) method.

In This Article
  • BeginConnect(EndPoint, AsyncCallback, Object)
  • BeginConnect(String, Int32, AsyncCallback, Object)
© REBEX ČR s.r.o. Back to top
Privacy policy
Manage cookies