Sends data asynchronously to a connected ISocket.
Namespace:
Rebex.Net
Assembly:
Rebex.Networking (in Rebex.Networking.dll)
Syntax
Visual Basic |
---|
Public Function BeginSend ( _ buffer As Byte(), _ offset As Integer, _ size As Integer, _ socketFlags As SocketFlags, _ callback As AsyncCallback, _ state As Object _ ) As IAsyncResult |
C# |
---|
public IAsyncResult BeginSend( byte[] buffer, int offset, int size, SocketFlags socketFlags, AsyncCallback callback, Object state ) |
Parameters
- buffer
- Type: array<System..::..Byte>[]()[][]
The data to be sent.
- offset
- Type: System..::..Int32
The position in the data buffer to begin sending data.
- size
- Type: System..::..Int32
The number of bytes to send.
- socketFlags
- Type: System.Net.Sockets..::..SocketFlags
A bitwise combination of the SocketFlags values.
- 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 send.Implements
ISocketExt..::..BeginSend(array<Byte>[]()[][], Int32, Int32, SocketFlags, AsyncCallback, Object)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 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.