Angus Leeming <[EMAIL PROTECTED]> writes:

| > Close but not quite. New connections (when speaking socket)
| > must be handled with an accept. The fd returned from this
| > accept can be passed to a socket_buf, and the rest can then be
| > handled by your stream. (except that you now have to prepared
| > to handle multiple streams at the same time.)
| 
| ....so the socketstream will indeed differ semantically from 
| pipestream. It will have
| 
| class socketstream {
|       ///
|       boost::function1<void, int> input_received;
|       ///
|       socketstream & operator[](int fd);
| };
| 
| whilst pipestream will have
| class pipestream {
|       ///
|       boost::function0<void> input_received;
| };
| 
| Ie, the socketstream will emit a callback passing the fd that 
| has received something interesting to the socketstream owner 
| which would extract the info with

well no... there should be no need to really know the fd after you
have passed it into the streamclass.
 
| socketstream ss;
| 
| input_ready(int fd)
| {     
|       ss[fd] >> ...
| }

this exposes too much low-level for my liking...

-- 
        Lgb

Reply via email to