On Sun, Mar 28, 2010 at 05:43:22PM -0500, Andrei Alexandrescu wrote:
> I think Adam's implementation is more interesting because it integrates 
> with File and consequently with the ranges that will come on top of it 
> (e.g. byCharacter, byLine, byChunk).

Yes, that's what I really wanted (and write/readln). stdin.byLine is
possibly the greatest thing ever, and extending it to network connections,
and other processes too, is a nice thing to have available.

One size doesn't fit all

> Thanks Adam. If you're willing to make your implementation available to 
> Phobos, you may want to put it in bugzilla.

Yes, certainly: http://d.puremagic.com/issues/show_bug.cgi?id=4025

I've written a HTTP client on top of it too.
http://arsdnet.net/dcode/http.d
(the import network refers to the module now in bugzilla)

I'm not completely happy with it yet, but it works pretty well anyway. The
File based code is much simpler than the raw socket code I used to use, though
the downside is File's calls block. OK for me, but probably not for everyone.

-- 
Adam D. Ruppe
http://arsdnet.net

Reply via email to