ProxySocket.BeginSend Method
Namespace: Rebex.Net
Assembly: Rebex.Networking.dll (version 7.0.9083)
BeginSend(Byte[], Int32, Int32, SocketFlags, AsyncCallback, Object)
Sends data asynchronously to a connected ProxySocket.
Declaration
public IAsyncResult BeginSend(byte[] buffer, int offset, int count, SocketFlags socketFlags, AsyncCallback callback, object state)
Parameters
Type | Name | Description |
---|---|---|
Byte[] | buffer | The data to be sent. |
Int32 | offset | The position in the data buffer to begin sending data. |
Int32 | count | The number of bytes to send. |
SocketFlags | socketFlags | A bitwise combination of the SocketFlags values. |
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 send. |
Remarks
Prior to sending data, the socket must be connected using either a call to Connect(EndPoint) method or a call to Listen(ISocket) and Accept() methods.
The BeginSend method starts asynchronously sending data through a ProxySocket. You should create a callback method that implements the AsyncCallback delegate. This callback method should use the EndSend method to complete the asynchronous operation. See the .NET Framework SDK Reference for more information on asynchronous methods.