nabto_device_listener_new_stream()

DESCRIPTION

Start listening for new streams. The stream resource must be kept alive untill the returned future is resolved.

Future status:

  • 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

DECLARATION

NABTO_DEVICE_DECL_PREFIX void NABTO_DEVICE_API
nabto_device_listener_new_stream(NabtoDeviceListener* listener,
                                 NabtoDeviceFuture* future,
                                 NabtoDeviceStream** stream)

PARAMETERS

listener:
[in] Listener to get new streams from.
future:
[in] Future which resolves when a new stream is ready, or an error occurs.
stream:
[out] Where to put reference to a new stream. The new stream must be freed by user.