istream_read_until_delimiter()

istream_read_until_delimiter()#

istream_read_until_delimiter() configures an input stream to read data until a specified delimiter is encountered.

Prototype

int istream_read_until_delimiter(
    istream_h   istream,
    const char  *delimiter,
    size_t      delimiter_size,
    gobj_event_t event
);

Parameters

Key

Type

Description

istream

istream_h

Handle to the input stream.

delimiter

const char *

Pointer to the delimiter string.

delimiter_size

size_t

Size of the delimiter in bytes.

event

gobj_event_t

Event to trigger when the delimiter is encountered.


Return Value

Returns 0 on success, or -1 if an error occurs.

Notes

If delimiter_size is 0, an error is logged and -1 is returned.

Prototype

// Not applicable in JS

Prototype

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