Who creates I/O buffers?

From: Henrik Nordstrom <henrik_at_henriknordstrom.net>
Date: Wed, 21 Jan 2009 10:31:48 +0100

Yet another answer to the IRC meeting

It was me that proposed read I/O buffers is created by the I/O layer who
feeds it to the upper layers. There is several reasons to this

- Amount needed not known until available, other than an upper bound.
- It's uncertain when the data will be available, and it's undesireable
to hold on to buffers until needed.
- Makes it easier to layer things needing transforms. Consider for
example SSL or chunked.

Regarding SSL & chunked, my long term goal is a design where these are
just layers in a chain using the same primary interface for data access.
There really shouldn't be any difference reading a HTTP body, disk file,
raw network socket or whatever stream of data. Or writing for that
matter.

Regards
Henrik
Received on Wed Jan 21 2009 - 09:32:07 MST

This archive was generated by hypermail 2.2.0 : Wed Jan 21 2009 - 12:00:26 MST