Method

FoundryJsonInputStreamread_upto

Declaration [src]

DexFuture*
foundry_json_input_stream_read_upto (
  FoundryJsonInputStream* self,
  const char* stop_chars,
  gssize stop_chars_len
)

Description [src]

Reads the next JSON message from the stream.

If stop_chars_len is > 0, then you man use \0 as a delimiter.

Use this form when you do not have HTTP headers containing the content length of the JSON message.

Parameters

stop_chars

Type: const char*

The characters that delimit json messages, such as \n.

The data is owned by the caller of the method.
The value is a NUL terminated UTF-8 string.
stop_chars_len

Type: gssize

Then length of stop_chars or -1 if it is \0 terminated.

Return value

Type: DexFuture

A DexFuture that resolves to a JsonNode or rejects with error.

The caller of the method takes ownership of the returned data, and is responsible for freeing it.