nabto_client_stream_write()

DESCRIPTION

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.

DECLARATION

NABTO_CLIENT_DECL_PREFIX void NABTO_CLIENT_API
nabto_client_stream_write(NabtoClientStream* stream, NabtoClientFuture* future, const void* buffer, size_t bufferLength)

PARAMETERS

stream:
[in] The stream to write data to.
future:
[in] The future that resolves when the write completes or fails.
buffer:
[in] The input buffer with data to write to the stream, the buffer needs to be kept alive until the future returns.
bufferLenth:
[in], length of the input data.

RETURN VALUES

None.

EXAMPLES

None.