Boost logo

Boost :

From: Hamish Mackenzie (hamish_at_[hidden])
Date: 2002-11-25 13:07:58


On Mon, 2002-11-25 at 15:57, Hugo Duncan wrote:
> > I have attached the
> > implementation of file_descriptor_set I have been using in my code
> > recently.
>
> Is there really any difference except in the name? The use of friend is
> for select is certainly worth thinking about.

Nope, just thought it might clear up what the role of update_width
(recalc_max) would be.

> I'll change the name to file_descriptor_set. The reason I had left it
> as socket_set was that I was not sure how to mix SOCKET and files
> on windows - but htat looks to be easy from your code....

Ah, I should have pointed out that I have only used file_descriptor_set
on sockets. I don't know if will work with win32 files.

Also Hu Xinwei pointed out that fd_set should probably be an
implementation detail. Check out this for instance...
http://www.xmailserver.org/linux-patches/nio-improve.html

Can we stick with SocketSetConcept and hide the fd_set completely.

I like the idea of a boost event system that would allow waiting on
several types of events in a portable way. But I don't know if it is
feasible. See..

http://aspn.activestate.com/ASPN/Mail/Message/boost/1448661

If we can't have something like that then separating sockets and files
makes sense. Perhaps though we could add a socket_event_source_set (or
nicer name) that would work as I described event_source_set but would
only support socket_read_event_source, socket_write_event_source and
socket_except_event_source. It could be implemented using three
socket_sets and select.

-- 
Hamish Mackenzie <hamish_at_[hidden]>

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