Cancellable libc read replacement.
Code that intends to be portable to Win32 should call this function only on file descriptors returned from open , not on sockets.
fd |
file descriptor |
buf |
buffer to fill |
n |
number of bytes to read into |
cancellable |
optional Cancellable object, or null |
number of bytes read or -1 on fail. On failure, errno will be set appropriately. |