ProxySocket.BeginConnect Method
Namespace: Rebex.Net
Assembly: Rebex.Networking.dll (version 7.0.9083)
BeginConnect(String, Int32, AsyncCallback, Object)
Begins an asynchronous request for a connection to a network device.
Declaration
public IAsyncResult BeginConnect(string serverName, int serverPort, AsyncCallback callback, object state)
Parameters
Type | Name | Description |
---|---|---|
String | serverName | The hostname (or IP address) of the remote device. |
Int32 | serverPort | 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 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.
BeginConnect(EndPoint, AsyncCallback, Object)
Begins an asynchronous request for a connection to a network device.
Declaration
public IAsyncResult BeginConnect(EndPoint remoteEP, AsyncCallback callback, object state)
Parameters
Type | Name | Description |
---|---|---|
EndPoint | remoteEP | An IPEndPoint 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 Connect method establishes a network connection to a host identified by the remoteEP parameter. 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.