201 Commits

Author SHA1 Message Date
Nikhil Warke
a1cfd5af56
Fix spelling in mqtt_esp8266 example 2018-09-24 00:29:11 +05:30
Folkert van Heusden
0e2d6c322b
Update PubSubClient.cpp
Make sure all data is flushed to the other end when doing a disconnect(): that way we know for sure that it is there when we disconnect the wifi or maybe even reboot.
This change was made after I noticed that I did not get any mqtt messages. I verified that it indeed solves the problem. Example code on request.
2018-09-07 21:39:45 +02:00
Adrian McEwen
b2f3a6d2ec Add example code for using the large message API. 2018-09-04 13:36:45 +01:00
Adrian McEwen
0c2d12d8b0 Allow the large message publishing to use all the print methods. 2018-09-04 13:31:43 +01:00
bwibwi13
c87c9a47b3 Correct maximum size of snprintf (use same size as the buffer ;) 2018-08-19 08:39:39 +02:00
Adrian McEwen
3b3a8da8d2 Add large-payload API, make max header size a define, not magic number. 2018-08-15 17:15:04 +01:00
apicquot
9e1a6e6479
Update PubSubClient.cpp
added yield to resolve random connection failure
2018-08-07 17:29:29 -04:00
Nick O'Leary
54be6e87db Check remaining-length encoding is valid 2018-07-18 11:02:08 +01:00
Trygve Laugstøl
f029640ee6 Fixing compiler warnings exposed with -Wall and -Wextra: qos can't be less than zero. (#274) 2018-02-22 18:29:44 -08:00
Rotzbua
bb101c58e8 Update link http->https (#384) 2018-01-20 00:13:10 +00:00
César Augusto
3b0775a91d Excluding nada.txt which was empty and improving indentation 2017-12-07 15:31:24 -03:00
César Augusto
6bc3b76a9b Adding improvments 2017-12-07 12:20:23 -03:00
Unknown
1174d642ab Updated documentation. 2017-11-16 16:37:41 -08:00
Unknown
8795fdf0f5 Create new signature to permit cleaner user code 2017-11-16 12:49:01 -08:00
Unknown
4fa0226cce Add some comments 2017-11-16 11:45:33 -08:00
César Augusto
54043f5469 Start 2017-11-14 22:34:33 -03:00
constantin
8498284792 Add ESP32 to documentation 2017-09-19 18:10:09 +02:00
constantin
49f307506b Add ESP32 callback signature to be functional like ESP8266 2017-09-18 19:27:44 +02:00
Nick O'Leary
dddfffbe0c Initialise buffer variables in test framework 2017-06-07 21:31:48 +01:00
Nick O'Leary
bef5814858 Add test for blank (not-null) password 2017-06-07 20:37:45 +01:00
duncan law
5b23a97fb0 Update documentation for dynamic buffer resizing. 2017-04-30 10:43:18 +01:00
duncan law
e21ac7baae Add test for dynamic buffer resize. 2017-04-30 10:32:48 +01:00
duncan law
a257083a66 Dynamic buffer size. 2017-04-30 10:29:25 +01:00
Kenneth Finnegan
98ad16eff8 Correct buffer overflow and remove magic constants from esp8266 example
The msg[] array is defined as 50 bytes long, but then the snprintf is
protected at 75 bytes long, which is incorrectly 25 bytes longer than
the underlying array.

To correct this, define a new macro MSG_BUFFER_SIZE and use it in both
places:
 * defining msg[]
 * writing to msg[] with snprintf()
2017-04-25 20:43:54 -07:00
Kenneth Finnegan
b85f4dc35c Corrected time data types in esp8266 example
The millis() function returns unsigned longs, not longs.
2017-04-25 20:39:09 -07:00
Nick O'Leary
f46d0011ee Merge pull request #270 from pacm93/master
Make Python files compliant with PEP8, except for E501
2017-04-12 08:58:43 +01:00
Paulo Martinez
10925659ef Made Python files compliant with PEP8, except for E501 2017-04-12 09:39:36 +02:00
Nick O'Leary
4c8ce14dad Merge pull request #169 from igrr/master
Use random MQTT client ID in example sketch
2016-08-21 23:22:25 +01:00
Nick O'Leary
df4122466c Merge pull request #173 from edwin-oetelaar/master
Reduce stack usage in loop(). no data duplication on stack
2016-08-21 23:21:03 +01:00
Edwin vd Oetelaar PA2LVD
d724864095 Reduce stack usage in loop(). No need to duplicate
topic string onto stack before giving it to callback()
Just move it one byte in buffer to add space for 'C' string end \0x00
2016-06-26 20:53:07 +02:00
Ivan Grokhotkov
33170273a9 Use random MQTT client ID in example sketch
Many users load the sketch having only changed WiFi SSID and password. When multiple users attempt to connect to the same broker using same client ID, they get rejected. Currently the chances of connecting to broker.mqtt-dashboard.com using "ESP8266Client" ID are fairly slim. This change adds a random number to the client ID, increasing chances of connection for new users of this library.
2016-06-14 19:10:15 +08:00
Nick O'Leary
35ead348e3 Fix esp8266 example 2016-02-13 21:23:48 +00:00
Nick O'Leary
341661671b Revert breaking change to callback signature v2.6 2016-02-02 07:40:48 +00:00
Nick O'Leary
4739ca0802 Update library files
closes #44
v2.5
2016-01-31 20:53:44 +00:00
Nick O'Leary
36bb1ffa6a Merge pull request #96 from ElvisTheKing/patch-1
correct handling of dns fauilure
2016-01-31 20:48:43 +00:00
Nick O'Leary
83b69a766e Merge pull request #120 from tomkcook/master
Use std::function on ESP8266 platform.
2016-01-31 20:47:32 +00:00
Nick O'Leary
baeb59e263 Merge pull request #119 from skorokithakis/master
Add definable parameters.
2016-01-31 20:41:19 +00:00
Tom Cook
67eba6dad4 Moved #include of <functional> 2016-01-27 12:41:50 +00:00
Tom Cook
98a9c296f6 Made use of std::function ESP8266-specific. 2016-01-27 12:39:43 +00:00
Stavros Korokithakis
68400b7b6c Add definable parameters. 2016-01-26 12:52:38 +02:00
Tom Cook
21b75a2c4a Changed callback type. 2016-01-26 09:50:27 +00:00
Sergey Konyukhovskiy
830f34c7d0 correct handling of dns fauilure
In case of domain name resolution error result can be negative (see Dns.cpp:46)
2015-12-04 04:10:18 +03:00
Nick O'Leary
0bb4efcea5 Update for 2.4 2.4 2015-11-21 20:56:32 +00:00
Nick O'Leary
31521085ea Increase rc of write to uint16 to match max possible length
Fixes #85
2015-11-21 20:36:21 +00:00
Nick O'Leary
8a1d7fb620 Merge pull request #93 from vicatcu/master
Implement timeout behavior in readByte / readPacket
2015-11-21 20:20:35 +00:00
Victor Aprea
803f54b0bd changes to use #define MQTT_SOCKET_TIMEOUT instead of dynamic read timeout interval, per comments from @knolleary on https://github.com/knolleary/pubsubclient/issues/87 2015-11-19 13:58:23 -05:00
Victor Aprea
6f97ea04f2 minor cleanup 2015-11-19 09:23:40 -05:00
Victor Aprea
6bb06187b7 added optional timeout setting so that readByte can be escaped 2015-11-18 17:19:41 -05:00
Nick O'Leary
efebd2e5e4 Merge pull request #82 from e-lin/master
Match the length of type for writing data
2015-10-04 19:35:29 +01:00
Elsa
5cdadf43da Match the length of type for writing data
In MQTT_MAX_TRANSFER_SIZE case, the variable bytesRemaining needs to match the type of data length.
2015-10-04 22:16:27 +09:00