next up previous contents index
Next: 4.9 Services Registry Up: 4.8 oskit_stream: standard interface Previous: 4.8.10 stat: Get attributes

4.8.11 clone: Create a new stream object for the same underlying object

 

SYNOPSIS

#include <oskit/com/stream.h>

OSKIT_COMDECL oskit_stream_clone(oskit_stream_t *f, [out] oskit_stream_t **out_stream);

DESCRIPTION

This method creates a new stream object for the same underlying object, with a distinct seek pointer. The seek pointer of the new object is initially set to the current seek pointer of this object.

Subsequent modifications of data within one stream object are visible to readers of the other object; likewise, locking on either object affects the other object.

PARAMETERS

f
The object to be cloned.
out_stream
The new stream object

RETURNS

Returns 0 on success, or an error code specified in <oskit/error.h>, on error.



University of Utah Flux Research Group