nabto_device_stream_accept()
DESCRIPTION
Accept a stream.
When a new stream is coming from the listener the stream is not accepted yet. If the application does not want to handle the stream it can just free it, else it has to call accept to finish the handshake. The future returns the status of the handshake.
Future status:
- NABTO_DEVICE_EC_OK if opening went ok.
- NABTO_DEVICE_EC_OPERATION_IN_PROGRESS if other accept is in progress
- NABTO_DEVICE_EC_ABORTED if device is closed
DECLARATION
NABTO_DEVICE_DECL_PREFIX void NABTO_DEVICE_API
nabto_device_stream_accept(NabtoDeviceStream* stream, NabtoDeviceFuture* future)
PARAMETERS
stream:
- [in] the stream to accept
future:
- [in] future which resolved when the stream is accepted