Method
GioDataInputStreamread_upto_async
since: 2.26
Declaration
void
g_data_input_stream_read_upto_async (
GDataInputStream* stream,
const gchar* stop_chars,
gssize stop_chars_len,
gint io_priority,
GCancellable* cancellable,
GAsyncReadyCallback callback,
gpointer user_data
)
Description
The asynchronous version of g_data_input_stream_read_upto(). It is an error to have two outstanding calls to this function.
In contrast to g_data_input_stream_read_until(), this function
does not consume the stop character. You have to use
g_data_input_stream_read_byte() to get it before calling
g_data_input_stream_read_upto() 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 g_data_input_stream_read_upto_finish() to get
the result of the operation.
Available since: 2.26
This method completes asynchronously. Use g_data_input_stream_read_upto_finish() inside the GAsyncReadyCallback to obtain the result of the operation.
Parameters
stop_chars-
Type:
const gchar*Characters to terminate the read.
The data is owned by the caller of the method. The value is a NUL terminated UTF-8 string. stop_chars_len-
Type:
gssizeLength of
stop_chars. May be -1 ifstop_charsis nul-terminated. io_priority-
Type:
gintThe [I/O priority][io-priority] of the request.
cancellable-
Type:
GCancellableOptional
GCancellableobject,NULLto ignore.The argument can be NULL.The data is owned by the caller of the method. callback-
Type:
GAsyncReadyCallbackCallback to call when the request is satisfied.
The argument can be NULL. user_data-
Type:
gpointerThe data to pass to callback function.
The argument can be NULL.The data is owned by the caller of the method.