Start listening for new streams. The stream resource must be kept alive untill the returned future is resolved.
- NABTO_DEVICE_EC_OK on success
- NABTO_DEVICE_EC_OPERATION_IN_PROGRESS if listener already have a future
- NABTO_DEVICE_EC_OUT_OF_MEMORY if future or and underlying structure could not be allocated
- NABTO_DEVICE_EC_ABORTED if underlying service stopped (eg. if device closed)
- NABTO_DEVICE_EC_STOPPED if the listener was stopped
NABTO_DEVICE_DECL_PREFIX void NABTO_DEVICE_API nabto_device_listener_new_stream(NabtoDeviceListener* listener, NabtoDeviceFuture* future, NabtoDeviceStream** stream)
- [in] Listener to get new streams from.
- [in] Future which resolves when a new stream is ready, or an error occurs.
- [out] Where to put reference to a new stream. The new stream must be freed by user.