Network I/O and streaming in D2
Joe Hildebrand
joe.hildebrand at webex.com
Fri Jul 2 00:07:52 PDT 2010
On 6/30/10 10:28 AM, "Adam Ruppe" <destructionator at gmail.com> wrote:
> For servers, they are still pretty useful. You can use the select()
> call on unix to wait for any one of a set of connections to be ready
> for you, and when it is, you then call the same blocking read/write
> functions. Since you know ahead of time that they are ready, it
> doesn't actually wait.
Select has been out of favor for quite a while in favor of poll, epoll,
kqueues, IO Completion ports, and the like. I'd recommend starting with
libevent2 (http://monkey.org/~provos/libevent/) if the license fits, and
fire events through the D concurrency mechanisms.
Layering blocking APIs on top of this should be pretty easy.
--
Joe Hildebrand
More information about the Digitalmars-d
mailing list