Gio.DataInputStream.prototype.read_until_async

function read_until_async(stop_chars: String, io_priority: Number(gint), cancellable: Gio.Cancellable, callback: Gio.AsyncReadyCallback): void {
    // Gjs wrapper for g_data_input_stream_read_until_async()
}
  

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

Note that, in contrast to Gio.DataInputStream.prototype.read_until, this function does not consume the stop character that it finds. You must read it for yourself.

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

Don't use this function in new code. Its functionality is inconsistent with Gio.DataInputStream.prototype.read_until. Both functions will be marked as deprecated in a future release. Use Gio.DataInputStream.prototype.read_upto_async instead.

Since 2.20

stop_chars

characters to terminate the read.

io_priority

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

cancellable

optional Gio.Cancellable object, null to ignore.

callback

callback to call when the request is satisfied.