getChunk

fun getChunk(offset: <Error class: unknown class>): <Error class: unknown class>?

Gets a struct@GLib.Bytes containing data from @body starting at @offset.

The size of the returned chunk is unspecified. You can iterate through the entire body by first calling method@MessageBody.get_chunk with an offset of 0, and then on each successive call, increment the offset by the length of the previously-returned chunk.

If @offset is greater than or equal to the total length of @body, then the return value depends on whether or not method@MessageBody.complete has been called or not; if it has, then method@MessageBody.get_chunk will return a 0-length chunk (indicating the end of @body). If it has not, then method@MessageBody.get_chunk will return null (indicating that

Return

a #GBytes

Parameters

offset

an offset