Streaming transport interfaces: input

Brad Roberts braddr at puremagic.com
Thu Oct 14 21:37:24 PDT 2010


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.



More information about the Digitalmars-d mailing list