Boost logo

Boost :

Subject: Re: [boost] [beast] write_some EWOULDBLOCK/EAGAIN error recovery non-blocking operations
From: Artyom Beilis (artyom.beilis_at_[hidden])
Date: 2017-07-03 20:18:23


On Mon, Jul 3, 2017 at 11:13 PM, Vinnie Falco via Boost
<boost_at_[hidden]> wrote:
> On Mon, Jul 3, 2017 at 1:10 PM, Artyom Beilis via Boost
> <boost_at_[hidden]> wrote:
>> Have been Beast tested with non blocking sockets?
>> I hadn't found a single reference to asio's non_blocking_io?
>
> I have not done any work at all with non blocking sockets, although
> that is on my todo. Specifically to make programs work which use the
> reactor model rather than the proactor model. This means
> boost::asio::null_buffers to take the place of "select".
>

I strongly recommend doing full testing of everything in non-blocking
mode because
(a) It is VERY common to mix them so you MUST work correctly
regardless the socket configuration.
(b) It provides a huge performance advantage especially for small
blocks over multiple connections since it reduces need for callback

Artyom


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk