nabto_client_connection_add_direct_candidate()

DESCRIPTION

Add a direct candidate.

This function can be used to manually add direct device hostnames/ips where the client can make a direct connection to a device. This is normally used in conjunction with local discovery of devices.

DECLARATION

NABTO_CLIENT_DECL_PREFIX NabtoClientError NABTO_CLIENT_API
nabto_client_connection_add_direct_candidate(NabtoClientConnection* connection, const char* hostname, uint16_t port)

PARAMETERS

connection:
[in] The connection
hostname:
[in] Either a dns name or an ip address.
port:
[in] Port to connect to.

RETURNS

  • NABTO_CLIENT_EC_OK: if ok.
  • NABTO_CLIENT_EC_INVALID_ARGUMENT: if the arguments is obviously invalid. e.g. using port number 0