buffer to read into
boundary to read until
length of @boundary in bytes
on return, the number of bytes read into @buffer
on return, whether or not the data in @buffer ends with the boundary string
a #GCancellable, or %NULL
as for soup_socket_read()
GException on failure.
Like soup_socket_read(), but reads no further than the first occurrence of @boundary. (If the boundary is found, it will be included in the returned data, and *@got_boundary will be set to %TRUE.) Any data after the boundary will returned in future reads.
soup_socket_read_until() will almost always return fewer than @len bytes: if the boundary is found, then it will only return the bytes up until the end of the boundary, and if the boundary is not found, then it will leave the last <literal>(boundary_len - 1)</literal> bytes in its internal buffer, in case they form the start of the boundary string. Thus, @len normally needs to be at least 1 byte longer than @boundary_len if you want to make any progress at all.