Write bytes to a stream.
When the future resolves the data is only written to the stream, but not neccessary acknowledged. This is why it does not make sense to return a number of actual bytes written in case of error since it says nothing about the number of acked bytes. To ensure that written bytes have been acked, a succesful call to nabto_client_stream_close is neccessary after last call to nabto_client_stream_write.
NABTO_CLIENT_DECL_PREFIX void NABTO_CLIENT_API nabto_client_stream_write(NabtoClientStream* stream, NabtoClientFuture* future, const void* buffer, size_t bufferLength)
- [in] The stream to write data to.
- [in] The future that resolves when the write completes or fails.
- [in] The input buffer with data to write to the stream, the buffer needs to be kept alive until the future returns.
- [in], length of the input data.