Skip to content

Commit 6d64213

Browse files
authored
Merge pull request #136 from ARMmbed/extend-transport-mode-configuration
Allow target-specific overrides for default client transport-mode
2 parents 46c8b0a + d9cbf24 commit 6d64213

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

mbed_cloud_client_user_config.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,13 @@
2020
#define MBED_CLOUD_CLIENT_USER_CONFIG_H
2121

2222
#define MBED_CLOUD_CLIENT_ENDPOINT_TYPE "default"
23-
#define MBED_CLOUD_CLIENT_TRANSPORT_MODE_TCP
2423
#define MBED_CLOUD_CLIENT_LIFETIME 3600
2524

25+
// Application can override the default transport mode via `target.macros_add` definition in mbed_app.json.
26+
#if !defined(MBED_CLOUD_CLIENT_TRANSPORT_MODE_UDP) && !defined(MBED_CLOUD_CLIENT_TRANSPORT_MODE_TCP) && !defined(MBED_CLOUD_CLIENT_TRANSPORT_MODE_UDP_QUEUE)
27+
#define MBED_CLOUD_CLIENT_TRANSPORT_MODE_TCP
28+
#endif
29+
2630
#ifdef MBED_CONF_MBED_CLIENT_SN_COAP_MAX_BLOCKWISE_PAYLOAD_SIZE
2731
#define SN_COAP_MAX_BLOCKWISE_PAYLOAD_SIZE MBED_CONF_MBED_CLIENT_SN_COAP_MAX_BLOCKWISE_PAYLOAD_SIZE
2832
#else

0 commit comments

Comments
 (0)