Method

SoupMessageBodyget_chunk

Declaration [src]

GBytes*
soup_message_body_get_chunk (
  SoupMessageBody* body,
  goffset offset
)

Description [src]

Gets a GBytes 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 soup_message_body_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 soup_message_body_complete() has been called or not; if it has, then soup_message_body_get_chunk() will return a 0-length chunk (indicating the end of body). If it has not, then soup_message_body_get_chunk() will return NULL (indicating that body may still potentially have more data, but that data is not currently available).

Parameters

offset

Type: goffset

An offset.

Return value

Type: GBytes

A GBytes.

The caller of the method takes ownership of the data, and is responsible for freeing it.
The return value can be NULL.