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 trad
On Saturday, 6 February 2016 at 06:29:56 UTC, cy wrote:
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 si
On Saturday, 6 February 2016 at 08:24:59 UTC, Jakob Ovrum wrote:
foreach(chunk; File("path/to/file").byChunk(16 * 1024))
Ohh, cool so the streaming...ish logic is in std.stdio now. I
thought that module was only for text output.
On Saturday, 6 February 2016 at 06:29:56 UTC, cy wrote:
I don't see anything analagous to what std.stream does in
phobos... has it just not been made public yet?
This was actually something that kind of killed my vibe when I
was working on a project recently. I wanted to use some interface
th