System.Net.Socket.TSocket.BeginReceive

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function BeginReceive(const AsyncCallbackEvent: TAsyncCallbackEvent; Count: Integer; Flags: TSocketFlags = []): IAsyncResult; overload;
function BeginReceive(const AsyncCallbackEvent: TAsyncCallbackEvent; Flags: TSocketFlags = []): IAsyncResult; overload; inline;
function BeginReceive(const AsyncCallback: TAsyncCallback; Count: Integer; Flags: TSocketFlags = []): IAsyncResult; overload;
function BeginReceive(const AsyncCallback: TAsyncCallback; Flags: TSocketFlags = []): IAsyncResult; overload; inline;
function BeginReceive(Count: Integer; Flags: TSocketFlags = []): IAsyncResult; overload; inline;
function BeginReceive(Flags: TSocketFlags = []): IAsyncResult; overload; inline;

C++

System::Types::_di_IAsyncResult __fastcall BeginReceive(const System::Classes::TAsyncProcedureEvent AsyncCallbackEvent, int Count, TSocketFlags Flags = TSocketFlags() )/* overload */;
System::Types::_di_IAsyncResult __fastcall BeginReceive(const System::Classes::TAsyncProcedureEvent AsyncCallbackEvent, TSocketFlags Flags = TSocketFlags() )/* overload */;
System::Types::_di_IAsyncResult __fastcall BeginReceive(const System::Classes::_di_TAsyncCallback AsyncCallback, int Count, TSocketFlags Flags = TSocketFlags() )/* overload */;
System::Types::_di_IAsyncResult __fastcall BeginReceive(const System::Classes::_di_TAsyncCallback AsyncCallback, TSocketFlags Flags = TSocketFlags() )/* overload */;
System::Types::_di_IAsyncResult __fastcall BeginReceive(int Count, TSocketFlags Flags = TSocketFlags() )/* overload */;
System::Types::_di_IAsyncResult __fastcall BeginReceive(TSocketFlags Flags = TSocketFlags() )/* overload */;

Properties

Type Visibility Source Unit Parent
function public
System.Net.Socket.pas
System.Net.Socket.hpp
System.Net.Socket TSocket

Description

Obtains data sent from the connected endpoint.

When you call BeginReceiveit immediately returns an instance of a class that implements the IAsyncResult interface.

You may pass BeginReceive the following parameters:

  • AsyncCallbackEvent, an event handler of type TAsyncCallbackEvent that is called once the data is received.
  • AsyncCallback, a method of type TAsyncCallback that is called once the data is received.
  • Count is the maximum length of the requested data that you want to obtain.
  • Flags is a set of flags that influence the behavior of Receive. For more information, see the documentation of the recv function in the MSDN.

Once your callback event handler or method is called, pass the returned instance of a class that implements the IAsyncResult interface to EndReceiveString or EndReceiveBytes, in order to accept the incoming connection.

See Also