Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support for ESP32 and 'message crackers'
The `WiFiClient` of ESP32 has non-standard behavior. When the (TCP/IP) connection is closed, it will start returning 0 as the result of `available()`, even though not all octets were read, and one can actually still `read()` them. So, we need "a middle-man" to keep track of how many octets are actually available for reading. This is, unfortunately, a slightly incompatible change. You need to use the new class `PubNonSubClient` for this to work. So, even though you don't _have_ to (and then ESP32 will not work, but it didn't work either in v2), it is different and warrants a major version bump. Also, for ease of use, we introduced "message crackers", which should inspire users to avoid the old `Client` based interface, making it easier to do similar upgrades/changes in the future. Examples were also cleaned-up: * Use new high-level API (message crackers) * Use ArduinoJson library in the Josn example * Update comments * Remove not-very-useful examples * Reformat with Clang format
- Loading branch information