SoupChunkAllocator

The prototype for a chunk allocation callback. This should allocate a new #SoupBuffer and return it for the I/O layer to read message body data off the network into.

If @max_len is non-0, it indicates the maximum number of bytes that could be read, based on what is known about the message size. Note that this might be a very large number, and you should not simply try to allocate that many bytes blindly. If @max_len is 0, that means that libsoup does not know how many bytes remain to be read, and the allocator should return a buffer of a size that it finds convenient.

If the allocator returns %NULL, the message will be paused. It is up to the application to make sure that it gets unpaused when it becomes possible to allocate a new buffer.

More...
alias SoupChunkAllocator = SoupBuffer* function(SoupMessage* msg, size_t maxLen, void* userData)

Return Value

the new buffer (or %NULL)

Detailed Description

Deprecated: Use #SoupRequest if you want to read into your own buffers.

Meta