Receive data (up to
buffer.length bytes) from a stream.
On error -1 is returned and throws is set accordingly.
receive can return any number of bytes, up to
buffer.length. If more than
bytes have been received, the additional data will be returned in future calls to receive.
If there is no data available, a g_io_error_would_block error will be returned.
a buffer to read data into (which should be at least
a gcancellable or null
the number of bytes you want to read from the stream
Number of bytes read, or 0 if the end of stream reached, or -1 on error.