$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: Christopher Kohlhoff (chris_at_[hidden])
Date: 2005-12-27 20:30:22
Hi Mats,
--- Mats Nilsson <mats.nilsson_at_[hidden]> wrote:
> What aspect makes demuxer_type different from Dispatcher?
A demuxer is inherently associated with I/O, whereas a
Dispatcher can be implemented without any reference to I/O
operations, e.g. just using a thread pool.
> Could this Demuxer concept derive from Dispatcher?
Yep, although in asio it's a class template (basic_demuxer<>)
rather than a concept.
> > Portable cancellation is achieved by closing the socket. Any
> > higher level abstraction would need to offer some sort of
> > cancellation function that forwards the calls to the
> > underlying socket, timer etc.
>
> Another concept? "CancelableOperation"?
This might be useful, but couldn't be implemented by lower level
classes like sockets. The problem is that on these classes
cancellation has a side effect (closure of socket), whereas on
timers, for example, it doesn't close the timer. This difference
might also apply to higher level objects, I don't know.
Cheers,
Chris