nabto_device_set_p2p_port()

DESCRIPTION

See nabto_device_set_local_port() for a description of local and p2p sockets.

This function sets the port number which the p2p socket is bound to. If this function is not called the port number 5593 is used. If this option is set to 0 a free port is choosen by the system.

The port needs to be set before the function nabto_device_start() is called.

DECLARATION

NABTO_DEVICE_DECL_PREFIX NabtoDeviceError NABTO_DEVICE_API
nabto_device_set_p2p_port(NabtoDevice* device, uint16_t port)

PARAMETERS

device:
[in] The device
port:
[in] The port number to bind to

RETURNS

NABTO_DEVICE_EC_OK on success