Just an example, why D rocks, and C++ s***s...

Vladimir Panteleev thecybershadow.lists at gmail.com
Tue Mar 22 13:34:06 UTC 2022


On Thursday, 17 March 2022 at 16:56:12 UTC, kdevel wrote:
> What if the program has got an already open socket (int) s or 
> an open File f. How easily are the remaining bytes "slurped" in 
> those cases?

Read all data from file descriptor:

```d
File f;
f.fdopen(STDIN_FILENO, "rb");
auto inbuffer = f.byChunk(4096).join;
```



More information about the Digitalmars-d mailing list