Starts a socket accept operation, obtaining a new socket from a listening socket. More...
#include <Async.h>
Public Member Functions | |
SC::Result | start (AsyncEventLoop &eventLoop, const SocketDescriptor &socketDescriptor) |
Sets async request members and calls AsyncEventLoop::start. | |
Starts a socket accept operation, obtaining a new socket from a listening socket.
The callback is called with a new socket connected to the given listening endpoint will be returned.
Socket library can be used to create a Socket but the socket should be created with SC::SocketFlags::NonBlocking and associated to the event loop with SC::AsyncEventLoop::associateExternallyCreatedSocket.
Alternatively SC::AsyncEventLoop::createAsyncTCPSocket creates and associates the socket to the loop.
SC::Result SC::AsyncSocketAccept::start | ( | AsyncEventLoop & | eventLoop, |
const SocketDescriptor & | socketDescriptor ) |
Sets async request members and calls AsyncEventLoop::start.