diff --git a/ChangeLog.txt b/ChangeLog.txt index f0871c87..d150fc12 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -20,6 +20,7 @@ Client library: - Fix publish properties not being passed to on_message_v5 callback for QoS 2 messages. Closes #1432. - Fix documentation issues in mosquitto.h. Closes #1478. +- Document `mosquitto_connect_srv()`. Closes #1499. Clients: - Fix duplicate cfg definition in rr_client. Closes #1453. diff --git a/lib/mosquitto.h b/lib/mosquitto.h index 6f52239a..71357ef8 100644 --- a/lib/mosquitto.h +++ b/lib/mosquitto.h @@ -583,20 +583,18 @@ libmosq_EXPORT int mosquitto_connect_bind_async(struct mosquitto *mosq, const ch /* * Function: mosquitto_connect_srv * - * Connect to an MQTT broker. This is a non-blocking call. If you use - * your client must use the threaded interface - * . If you need to use , you must use - * to connect the client. + * Connect to an MQTT broker. * - * This extends the functionality of by adding the - * bind_address parameter. Use this function if you need to restrict network - * communication over a particular interface. + * If you set `host` to `example.com`, then this call will attempt to retrieve + * the DNS SRV record for `_secure-mqtt._tcp.example.com` or + * `_mqtt._tcp.example.com` to discover which actual host to connect to. * - * May be called before or after . + * DNS SRV support is not usually compiled in to libmosquitto, use of this call + * is not recommended. * * Parameters: * mosq - a valid mosquitto instance. - * host - the hostname or ip address of the broker to connect to. + * host - the hostname to search for an SRV record. * keepalive - the number of seconds after which the broker should send a PING * message to the client if no other messages have been exchanged * in that time.