nabto_client_stream_close()
DESCRIPTION
Close a stream for writing of more data. When a stream has been closed no further data can be written to the stream. Data can however still be read from the stream until the other peer closes the stream and this end sees an end of file error.
When close returns all written data has been acknowledged by the other peer. Close cannot be executed at the same time a stream write is in progress.
Future status:
- NABTO_CLIENT_EC_OK if the stream is closed for writing.
- NABTO_CLIENT_EC_STOPPED if the stream is stopped.
- NABTO_CLIENT_EC_OPERATION_IN_PROGRESS if a stream close or stream write is in progress.
- NABTO_CLIENT_EC_INVALID_STATE if the stream is not yet opened.
DECLARATION
NABTO_CLIENT_DECL_PREFIX void NABTO_CLIENT_API
nabto_client_stream_close(NabtoClientStream* stream, NabtoClientFuture* future)
PARAMETERS
stream:
- [in] The stream to close.
future:
- [in] The future.