File tree 2 files changed +16
-1
lines changed
2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change 156
156
#define HAS_TCP
157
157
#endif
158
158
159
+ #ifdef HAS_TCP
160
+ #ifndef MQTT_TX_BUFFER_SIZE
161
+ #define MQTT_TX_BUFFER_SIZE 256
162
+ #endif // MQTT_TX_BUFFER_SIZE
163
+
164
+ #ifndef STRING_PROPERTY_MAX_SIZE
165
+ // 6 represents the expected overhead of a string property inside a cbor
166
+ #define STRING_PROPERTY_MAX_SIZE MQTT_TX_BUFFER_SIZE - 6
167
+ #endif // STRING_PROPERTY_MAX_SIZE
168
+ #else
169
+ #ifndef STRING_PROPERTY_MAX_SIZE
170
+ #define STRING_PROPERTY_MAX_SIZE 50
171
+ #endif // STRING_PROPERTY_MAX_SIZE
172
+ #endif // HAS_TCP
173
+
159
174
/******************************************************************************
160
175
* CONSTANTS
161
176
******************************************************************************/
Original file line number Diff line number Diff line change @@ -106,7 +106,7 @@ class ArduinoIoTCloudTCP: public ArduinoIoTCloudClass
106
106
#endif
107
107
108
108
private:
109
- static const int MQTT_TRANSMIT_BUFFER_SIZE = 256 ;
109
+ static const int MQTT_TRANSMIT_BUFFER_SIZE = MQTT_TX_BUFFER_SIZE ;
110
110
111
111
enum class State
112
112
{
You can’t perform that action at this time.
0 commit comments