nabto_device_stream_write()

DESCRIPTION

Write bytes to a stream.

When the future resolves the data is only written to the stream, but not neccessary acked. 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_device_stream_close() is neccessary after last call to nabto_device_stream_write().

DECLARATION

NABTO_DEVICE_DECL_PREFIX void NABTO_DEVICE_API
nabto_device_stream_write(NabtoDeviceStream* stream,
                          NabtoDeviceFuture* future,
                          const void* buffer,
                          size_t bufferLength)

PARAMETERS

stream:
[in] The stream to write data to.
future:
[in] Future to resolve with the result of the operation.
buffer:
[in] The input buffer with data to write to the stream.
bufferLength:
[in] Length of the input data.

RETURN VALUES

None.

EXAMPLES

None.