Boost logo

Boost Users :

Subject: Re: [Boost-users] Async_accept
From: Rutger ter Borg (rutger_at_[hidden])
Date: 2011-03-03 04:26:36


On 03/03/2011 10:13 AM, Marco Piacentini wrote:
> Hi guys...
> Reading docs, I understand that acceptor.async_accept(), accept a
> connection and immediately return, so the acceptor can accept another
> concurrent connection request...and in the meanwhile the handler can
> process the request...it's right?

No, the asynchronous model works different: you issue a request for an
operation, such as async_accept, and your program will be called back
when that operation has been completed (or aborted). In this case, the
handler will be invoked after your request for accepting a connection
has been completed. Asio will not start accepting another connecting
until you issue another request, which should be done after your
previous request has been completed.

HtH,
Cheers,

Rutger


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net