ProxySocket.BeginReceive Method
Namespace: Rebex.Net
Assembly: Rebex.Networking.dll (version 7.0.9083)
BeginReceive(Byte[], Int32, Int32, SocketFlags, AsyncCallback, Object)
Begins to asynchronously receive data from a connected ProxySocket.
Declaration
public IAsyncResult BeginReceive(byte[] buffer, int offset, int count, SocketFlags socketFlags, AsyncCallback callback, object state)
Parameters
Type | Name | Description |
---|---|---|
Byte[] | buffer | The storage location for the received data. |
Int32 | offset | The position in the buffer at which to store the received data. |
Int32 | count | The number of bytes to receive. |
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 read. |
Remarks
Prior to receiving data, the socket must be connected using either a call to Connect(EndPoint) method or a call to Listen(ISocket) and Accept() methods.
The BeginReceive method starts asynchronously reading data from a ProxySocket. You should create a callback method that implements the AsyncCallback delegate. This callback method should use the EndReceive method to complete the asynchronous operation. See the .NET Framework SDK Reference for more information on asynchronous methods.