61 Commits

Author SHA1 Message Date
24510271ff Add setSocketTimeout function 2020-05-20 01:33:31 +01:00
77c4e445ea Add setKeepAlive function and tests 2020-05-20 01:18:02 +01:00
64e981190b Merge branch 'master' into pr_282 2020-05-20 00:49:38 +01:00
baad92dd0c Fix merge error with strnlen 2020-05-09 23:20:44 +01:00
98098ede85 Merge branch 'master' into strnlen-patch-1 2020-05-09 22:29:59 +01:00
6099ee028f Added check to prevent subscribe/unsubscribe to empty topics 2020-04-12 01:20:08 +03:00
cff1fc7bdd Merge pull request #568 from turgu1/patch-1
Allow streaming of large messages
2019-11-25 11:34:25 +00:00
8a5b51803d Merge pull request #600 from sensidev/master
Fix publish_P return value
2019-11-25 11:32:18 +00:00
1f4011142b Merge pull request #528 from lexszero/patch-1
Fix publish() when payload == NULL
2019-11-25 11:29:38 +00:00
b1cb57208c Merge pull request #361 from eykamp/comments
Add some comments
2019-11-25 11:28:00 +00:00
299c8293cb Merge pull request #365 from czaraugust/master
Adding some speed improvments
2019-11-25 11:27:24 +00:00
2b83aa0804 Merge pull request #571 from kevinresol/patch-1
Support pre-connected Client
2019-11-25 11:21:09 +00:00
f13ad2af3b PubSubClient.cpp: Using strnlen() 2019-08-22 17:19:38 +01:00
719b90eafd PubSubClient.h: Using strnlen() 2019-08-22 17:14:02 +01:00
bc65fe5244 Removed an unused variable 2019-05-09 22:10:56 +02:00
1b9f52b1fc Fix publish_P return value 2019-04-07 22:19:47 +03:00
a4f7821a70 Support pre-connected Client 2019-02-04 00:07:05 +08:00
373c7d3569 Update PubSubClient.h 2019-01-28 18:47:18 -05:00
b6239823fb Allow streaming of large messages
These changes are required to allow for the transmission of large messages through a connected stream. The changes do not have an impact on the class interface and habitual behavior. In particular, it will enable the use of OTA through a stream hooked through the setStream() class method. I've designed such a stream to demonstrate the functionality: https://github.com/turgu1/mqtt_ota_example.git

Guy
2019-01-28 18:02:37 -05:00
2dca84a776 Fix publish() when payload == NULL
Messages with empty payload are completely valid and are actually useful (e.g., to delete retained value).
This adds a check before calling `strlen()` to prevent crash when using shortcut methods taking `const char*`
2018-11-21 03:09:08 +02:00
fa3c4362ea Merge branch 'master' into master 2018-11-02 01:07:33 +00:00
2bcd9b074a Merge pull request #472 from apicquot/master
Add yield to resolve connection failures
2018-11-02 01:01:44 +00:00
2ed03ad522 Merge pull request #362 from eykamp/new_sig
Create new signature to permit cleaner user code
2018-11-02 00:53:02 +00:00
2d053d2df0 Add buffer overflow protection to connect
Closes #492
2018-11-02 00:50:52 +00:00
ee30733e24 Fixup bad revert of 500 2018-11-02 00:12:44 +00:00
4daba0ae5c Fix remaining length protection 2018-11-02 00:06:32 +00:00
af860133e8 Merge branch 'pr_500' 2018-11-01 23:47:15 +00:00
a0f09681f5 Add separate connect function for clean session + test 2018-11-01 23:46:09 +00:00
3637cbec69 Revert "Added support of CleanSession flag during connect" 2018-11-01 23:35:31 +00:00
b1bdbb7aaf Merge pull request #500 from maxim-kukushkin/master
Added support of CleanSession flag during connect
2018-11-01 23:33:51 +00:00
b5f90b679b Merge pull request #495 from flok99/patch-1
Update PubSubClient.cpp
2018-11-01 23:28:22 +00:00
8154cbc09c Fixed an issue with clean session flag set when willTopic is provided 2018-10-22 23:35:47 +01:00
0e8e3123cf Added support of CleanSession flag during connect 2018-10-02 00:02:31 +01:00
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
0c2d12d8b0 Allow the large message publishing to use all the print methods. 2018-09-04 13:31:43 +01:00
3b3a8da8d2 Add large-payload API, make max header size a define, not magic number. 2018-08-15 17:15:04 +01:00
9e1a6e6479 Update PubSubClient.cpp
added yield to resolve random connection failure
2018-08-07 17:29:29 -04:00
54be6e87db Check remaining-length encoding is valid 2018-07-18 11:02:08 +01:00
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
3b0775a91d Excluding nada.txt which was empty and improving indentation 2017-12-07 15:31:24 -03:00
6bc3b76a9b Adding improvments 2017-12-07 12:20:23 -03:00
8795fdf0f5 Create new signature to permit cleaner user code 2017-11-16 12:49:01 -08:00
4fa0226cce Add some comments 2017-11-16 11:45:33 -08:00
49f307506b Add ESP32 callback signature to be functional like ESP8266 2017-09-18 19:27:44 +02:00
a257083a66 Dynamic buffer size. 2017-04-30 10:29:25 +01:00
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
341661671b Revert breaking change to callback signature 2016-02-02 07:40:48 +00:00
36bb1ffa6a Merge pull request #96 from ElvisTheKing/patch-1
correct handling of dns fauilure
2016-01-31 20:48:43 +00:00
83b69a766e Merge pull request #120 from tomkcook/master
Use std::function on ESP8266 platform.
2016-01-31 20:47:32 +00:00
67eba6dad4 Moved #include of <functional> 2016-01-27 12:41:50 +00:00