nabto_device_stream_init_listener_ephemeral()

DESCRIPTION

Initialize a listener for new streams with ephemeral port number.

DECLARATION

NABTO_DEVICE_DECL_PREFIX NabtoDeviceError NABTO_DEVICE_API
nabto_device_stream_init_listener_ephemeral(NabtoDevice* device,
                                            NabtoDeviceListener* listener,
                                            uint32_t* port)

PARAMETERS

device:
[in] device
listener:
[in] Listener to initialize for streaming
port:
[out] Where to put the chosen port number

RETURNS

  • NABTO_DEVICE_EC_OK: on success
  • NABTO_DEVICE_EC_OUT_OF_MEMORY: if underlying structure could not be allocated
  • NABTO_DEVICE_EC_OPERATION_IN_PROGRESS: if the port number has an active listener