System.Net.Socket.TSocket.BeginAccept
Delphi
function BeginAccept(const AsyncCallbackEvent: TAsyncCallbackEvent; Timeout: Cardinal = INFINITE): IAsyncResult; overload;
function BeginAccept(const AsyncCallback: TAsyncCallback; Timeout: Cardinal = INFINITE): IAsyncResult; overload;
function BeginAccept(Timeout: Cardinal = INFINITE): IAsyncResult; overload; inline;
C++
System::Types::_di_IAsyncResult __fastcall BeginAccept(const System::Classes::TAsyncCallbackEvent AsyncCallbackEvent, unsigned Timeout = (unsigned)(0xffffffff))/* overload */;
System::Types::_di_IAsyncResult __fastcall BeginAccept(const System::Classes::_di_TAsyncCallback AsyncCallback, unsigned Timeout = (unsigned)(0xffffffff))/* overload */;
System::Types::_di_IAsyncResult __fastcall BeginAccept(unsigned Timeout = (unsigned)(0xffffffff))/* overload */;
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | System.Net.Socket.pas System.Net.Socket.hpp |
System.Net.Socket | TSocket |
Description
Accepts an incoming connection asynchronously.
When you call BeginAccept it immediately returns an instance of a class that implements the IAsyncResult interface.
You may pass BeginAccept the following parameters:
AsyncCallbackEvent
, an event handler of type TAsyncCallbackEvent that is called once there is an incoming connection.AsyncCallback
, a method of type TAsyncCallback that is called once there is an incoming connection.Timeout
, the maximum number of milliseconds to wait for an incoming connection.
Once your callback event handler or method is called, pass EndAccept the returned instance of a class that implements the IAsyncResult interface, in order to accept the incoming connection.