DataInputStream.readUptoAsync

The asynchronous version of DataInputStream.readUpto. It is an error to have two outstanding calls to this function.

In contrast to DataInputStream.readUntil, this function does not consume the stop character. You have to use DataInputStream.readByte to get it before calling DataInputStream.readUpto again.

Note that stop_chars may contain '\0' if stop_chars_len is specified.

When the operation is finished, callback will be called. You can then call DataInputStream.readUptoFinish to get the result of the operation.

class DataInputStream
void
readUptoAsync

Parameters

stopChars string

characters to terminate the read

stopCharsLen ptrdiff_t

length of stop_chars. May be -1 if stop_chars is nul-terminated

ioPriority int

the [I/O priority][io-priority] of the request

cancellable Cancellable

optional gio.Cancellable object, NULL to ignore

callback GAsyncReadyCallback

callback to call when the request is satisfied

userData void*

the data to pass to callback function

Meta

Since

2.26