istream_read_until_num_bytes()
#
Configures the istream_h
stream to read until a specified number of bytes is accumulated before triggering an event.
Prototype
int istream_read_until_num_bytes(
istream_h istream,
size_t num_bytes,
gobj_event_t event
);
Parameters
Key |
Type |
Description |
---|---|---|
|
|
Handle to the input stream. |
|
|
The number of bytes to accumulate before triggering the event. |
|
|
The event to trigger when the specified number of bytes is reached. |
Return Value
Returns 0 on success, or -1 if an error occurs.
Notes
Once the specified number of bytes is accumulated, the event is triggered with the collected data.
Prototype
// Not applicable in JS
Prototype
# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples