MessageBody

class MessageBody(pointer: <Error class: unknown class><<Error class: unknown class>>)

#SoupMessageBody represents the request or response body of a class@Message.

Note that while @length always reflects the full length of the message body, @data is normally null, and will only be filled in after method@MessageBody.flatten is called. For client-side messages, this automatically happens for the response body after it has been fully read. Likewise, for server-side messages, the request body is automatically filled in after being read.

As an added bonus, when @data is filled in, it is always terminated with a \0 byte (which is not reflected in @length).

Skipped during bindings generation

  • parameter data: Array parameter of type guint8 is not supported

  • field data: Array parameter of type guint8 is not supported

Constructors

Link copied to clipboard
constructor(pointer: <Error class: unknown class><<Error class: unknown class>>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
var length: <Error class: unknown class>

length of @data

Link copied to clipboard
val soupMessageBodyPointer: <Error class: unknown class><<Error class: unknown class>>

Functions

Link copied to clipboard
fun appendBytes(buffer: <Error class: unknown class>)

Appends the data from @buffer to @body.

Link copied to clipboard
fun complete()

Tags @body as being complete.

Link copied to clipboard
fun flatten(): <Error class: unknown class>

Fills in @body's data field with a buffer containing all of the data in @body.

Link copied to clipboard

Gets the accumulate flag on @body.

Link copied to clipboard
fun getChunk(offset: <Error class: unknown class>): <Error class: unknown class>?

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

Link copied to clipboard
fun gotChunk(chunk: <Error class: unknown class>)

Handles the #SoupMessageBody part of receiving a chunk of data from the network.

Link copied to clipboard

Atomically increments the reference count of @body by one.

Link copied to clipboard
fun setAccumulate(accumulate: Boolean)

Sets or clears the accumulate flag on @body.

Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
fun truncate()

Deletes all of the data in @body.

Link copied to clipboard
fun unref()

Atomically decrements the reference count of @body by one.

Link copied to clipboard
fun wroteChunk(chunk: <Error class: unknown class>)

Handles the #SoupMessageBody part of writing a chunk of data to the network.