What's going to replace std.stream?
cy via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Fri Feb 5 22:29:56 PST 2016
Let's say I have a socket, and a file, and I want to send the
contents of that file to the socket. What's the best way to do
that? Yes I'm aware that in Linux, you can use a combination of a
pipe and splice(2) to keep all buffers kernel side for that, but
I was thinking more generally. The traditional C way is to read()
into a buffer, then write() it out, until the input is exhausted.
But apparantly in D we're not supposed to do that?
It's just that I tried to use std.stream, and found that the
whole module had been marked as deprecated some time last year.
What exactly is going to replace it? Some sort of lazy file
contents accessor, that can take advantage of zero copy things
like splice() when hooked together? A source/sink paradigm maybe?
I don't see anything analagous to what std.stream does in
phobos... has it just not been made public yet?
More information about the Digitalmars-d-learn
mailing list