mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-05-17 13:46:56 +08:00
mqtt: Allow setting server port to connect
This is a mqtt client, so it does not make sense to determinate the server port at compile time. Update mqtt_client_connect() function to allow setting server port. Signed-off-by: Axel Lin <axel.lin@ingics.com>
This commit is contained in:
committed by
Dirk Ziegelmeier
parent
2e4b368c8c
commit
bfa0358a52
@@ -204,7 +204,7 @@ struct mqtt_client_t
|
||||
|
||||
|
||||
/** Connect to server */
|
||||
err_t mqtt_client_connect(mqtt_client_t *client, const ip_addr_t *ipaddr, mqtt_connection_cb_t cb, void *arg,
|
||||
err_t mqtt_client_connect(mqtt_client_t *client, const ip_addr_t *ipaddr, u16_t port, mqtt_connection_cb_t cb, void *arg,
|
||||
const struct mqtt_connect_client_info_t *client_info);
|
||||
|
||||
/** Disconnect from server */
|
||||
|
||||
@@ -71,13 +71,6 @@ extern "C" {
|
||||
#define MQTT_REQ_MAX_IN_FLIGHT 4
|
||||
#endif
|
||||
|
||||
/**
|
||||
* MQTT server port to connect to
|
||||
*/
|
||||
#ifndef MQTT_PORT
|
||||
#define MQTT_PORT 1883
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Seconds between each cyclic timer call.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user