Attempts to read up to buffer.length
bytes from this into buffer
, as with
read.
If this is not currently readable, this will immediately return g_io_error_would_block, and you can use create_source to create a SocketSource that will be triggered when this is readable.
Note that since this method never blocks, you cannot actually use cancellable
to cancel it. However, it will return an error
if cancellable
has already been cancelled when you call, which may happen if you call this method after a source triggers
due to having been cancelled.
this | |
buffer |
a buffer to read data into (which should be at least |
cancellable |
a Cancellable, or null |
count |
the number of bytes you want to read |
the number of bytes read, or -1 on error (including g_io_error_would_block). |