From: Robert Klemme Date: 2004-11-29T17:37:50+09:00 Subject: Re: [ANN] Multiplexer - linear non-blocking I/O "Mikael Brockman" schrieb im Newsbeitrag news:87zn1283px.fsf@igloo.phubuh.org... > > Btw, if the only problem is blocking while sending huge chunks of > > data, then what *I* would do is this: I'd override send() (and others > > that might be necessary) to do just that. Then one can still use the > > simple threaded approach and does not have to care about thread > > blocking. (Maybe this should even be part of the std lib's socket > > implementation?) > > If blocking on read() is a problem, too, then Multiplexer is essentially > what you get when you solve it and refactor away the (in my case) > redundant multi-threading. :-) I also forgot the problems of bidirectional communication that make threaded communication much more complicated, too. The threaded solution is really simple and most elegant *only* if there is only one way communication or if the protocol always makes clear who is sender and receiver at a certain point in time. Thanks for taking your time to sort these things out! Kind regards robert