istream_create()

istream_create()#

istream_create() initializes and returns a new input stream (istream_h) with a specified buffer size and maximum capacity.

Prototype

istream_h istream_create(
    hgobj gobj,
    size_t data_size,
    size_t max_size
);

Parameters

Key

Type

Description

gobj

hgobj

The parent object managing the input stream.

data_size

size_t

The initial size of the buffer allocated for the input stream.

max_size

size_t

The maximum allowed size of the buffer.


Return Value

Returns a handle (istream_h) to the newly created input stream, or NULL if memory allocation fails.

Notes

The returned istream_h must be destroyed using istream_destroy() to free allocated resources.

Prototype

// Not applicable in JS

Prototype

# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples