Read some bytes from a stream.
Read atleast 1 byte from the stream, unless an error occurs or the stream is eof.
NABTO_CLIENT_DECL_PREFIX void NABTO_CLIENT_API nabto_client_stream_read_some(NabtoClientStream* stream, NabtoClientFuture* future, void* buffer, size_t bufferLength, size_t* readLength)
- [in] The stream to read bytes from
- [in] The future that resolves when the read completes or fails.
- [out] The buffer where bytes is copied to. It needs to be kept available until the future resolves.
- [in] The length of the output buffer.
- [out] The actual number of read bytes. It needs to be kept available until the future resolves.
a future which resolves to ok or a stream error. Future status: NABTO_CLIENT_EC_OK if some bytes was read. NABTO_CLIENT_EC_EOF if stream is eof. NABTO_CLIENT_EC_ABORTED if the stream is aborted. NABTO_CLIENT_EC_OPERATION_IN_PROGRESS if another read is in progress.