Boost logo

Boost :

From: Oliver.Kowalke_at_[hidden]
Date: 2005-12-12 07:11:10

Hello Christopher,

>Hi Oliver,
>Multicast support is there - see the example in libs/asio/multicast and
>the boost::asio::ipv4::multicast namespace.

Sorry - I was searching in the 0.20 version (as I could see 0.3.6
contains multicast).

>> SIGPIPE is blocked by the ctor of basic_demuxer - I think it
>> would be better to block SIGPIPE only in the functions reading
>> from the socket and after that reset to the original signal
>> handler.
>But that would mean that the SIGPIPE is still delivered to the
>application, wouldn't it? That's not very nice since the default
>behaviour for SIGPIPE is to terminate the application. I chose to
>ignore SIGPIPE globally since most people writing portable applications
>would never want to know about it. If you do feel the need to handle
>SIGPIPE yourself, just specialise boost::asio::detail::signal_init so
>that it isn't ignored.

I don't agree.
Only if write/sendto is called on a closed socket SIGPIPE should be
blocked by your library.
In all other cases the user defined signal handler for SIGPIPE should be
In your solution the user can only ignore SIGPIPE globally (even if the
signal is generated from other sources than sockets) or install its own
signal handler - and so be forced to distinguish between SIGPIPE from
socket and other sources (problem - multiple sockets; which socket has
generated the signal?).

>> EINTR is not handled in the reading/writing functions?
>The blocking functions will return error::interrupted in this case.

Wouldn't it be better to call read/write again if EINTR is returned?

>> Is it correct, that asio doesn't use AIO System Interfaces from
>> the OS (like aiocb, aio_read, aio_write, aio_suspend, ...)?
>However these function don't support sockets on Linux yet (AFAIK, it
>may just be that they don't support sockets efficiently)

Support for kernel AIO has been included in the 2.6 Linux kernel.
AIO read and write on sockets doesn't return an explicit error, but
quietly defaults to synchronous or rather non-AIO behavior.

>and for solaris I'm planning to support /dev/poll first.

/dev/poll is also supported by Linux.

So long,

Boost list run by bdawes at, gregod at, cpdaniel at, john at