nabto_device_virtual_stream_read_all()
DESCRIPTION
Read exactly bufferLength bytes from a virtual stream.
if (readLength != bufferLength) the stream has reached a state where no more bytes can be read.
Future status:
- NABTO_DEVICE_EC_OK if all data was read.
- NABTO_DEVICE_EC_EOF if only some data was read and the stream is eof.
- NABTO_DEVICE_EC_ABORTED if the stream is aborted.
- NABTO_DEVICE_EC_OPERATION_IN_PROGRESS if stream is already being read
DECLARATION
NABTO_DEVICE_DECL_PREFIX void NABTO_DEVICE_API
nabto_device_virtual_stream_read_all(NabtoDeviceVirtualStream* stream,
NabtoDeviceFuture* future,
void* buffer,
size_t bufferLength,
size_t* readLength)
PARAMETERS
stream:
- [in] The virtual stream to read bytes from.
future:
- [in] Future to resolve with the result of the operation.
buffer:
- [out] The output buffer to put data into.
bufferLength:
- [in] The length of the output buffer and number of bytes to read.
readLength:
- [out] The actual number of bytes read.