TlsSocket.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 ISocket.
Declaration
public IAsyncResult BeginSend(byte[] buffer, int offset, int size, 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 | size | 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 Rebex.Net.TlsSocket.Listen(Rebex.Net.ISocket) and Rebex.Net.TlsSocket.Accept methods.
The BeginSend method starts asynchronously sending data through the ISocket. 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.