whio  Artifact Content

Artifact cca596e86b1765d52d7c7f093c32f024592eb945:

Wiki page [whio_stream] by stephan 2011-05-23 18:50:58.
D 2011-05-23T18:50:58.173
L whio_stream
P 5c41c29520263ca7e8e397ea5efa545f79f725d3
U stephan
W 1225
<strong>ACHTUNG: AS OF 20110523, THIS PAGE IS NOW MAINTAINED IN THE NEW WIKI:</strong> [http://whiki.wanderinghorse.net/wikis/whio/?page=whio_stream]

<h1>whio_stream API</h1>

whio_stream is a C struct (declared in <tt>&lt;wh/whio/whio_stream.h&gt;</tt>) which defines an interface for basic sequential-access i/o operations.

whio_stream specifies only an interface, and instances of concrete implementations are created via various factory functions (declared in <tt>&lt;wh/whio/whio_streams.h&gt;</tt>).  Unlike the [whio_dev] interface, streams typically provide <em>either</em> read-only or write-only access, but not both.

Implementations are provided for the following types of streams:

  *  Local files, either by filename, <tt>FILE</tt> handle, or file descriptor.
  *  A wrapper for any [whio_dev] object.

It is simple to create implementations for any type of device which provides facilities for sequential access. In doing so, any generic i/o algorithms, or code which uses whio_stream for its i/o, can use such client-supplied whio_stream implementations.

The whio_stream API is neither as large nor as flexible as the [whio_dev] API, but is suitable when simple sequential access is needed.

Z a4d521c9f17ca9dc7b2915f866a02cbc