Streaming transport interfaces: input
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Thu Oct 14 21:44:47 PDT 2010
On 10/14/10 23:37 CDT, Brad Roberts wrote:
> On 10/14/2010 8:34 AM, Andrei Alexandrescu wrote:
>> Starting a new thread from Denis' question:
>>
>>> Can we outline basic Stream interface now so that we could move on?
>>
>> Here's the input transport layer. Transport has no concern for formatting - it
>> just moves stuff around.
>>
>
> I suggest having read and write with offset style apis. See also: man pread
>
> The value here is that you can safely concurrently access a file descriptor and
> not have to worry about atomicity of seek+read or seek+write at the app layer.
This is very interesting - I had no idea about pread and pwrite.
http://linux.die.net/man/2/pread
Andrei
More information about the Digitalmars-d
mailing list