nodemcu-firmware/docs
Nathaniel Wesley Filardo c695a451ee
First round of MQTT fixes (#3360)
* mqtt: remove concept of connection timeout

Just rely on the network stack to tell us when things have gone south.

* mqtt: remove write-only mqtt_state.port field

* mqtt: drop useless conditional

* mqtt: decouple message sent flag from timer

* mqtt: reconnect callback does not need to hang up

The network stack has certainly done that for us at this point.
Similarly, since we're about to call mqtt_socket_disconnected, don't
bother unregistering the timer here, either.

* mqtt: don't tick once per second

Set the timer for the duration of the wait and cancel it on the other side.

* mqtt: defer message queue destruction to _disconnect

We're going to want to publish a disconnect message for real, so doing
this in _close does no one any favors

* mqtt: miscellaneous cleanups

No functional change intended

* mqtt: close() should send disconnect message for real

This means waiting for _sent() to fire again before telling the network
stack to disconnect.

* mqtt: tidy connect and dns

- Push the self-ref to after all allocations and error returns

- Don't try to extract IPv4 from the domain string ourselves, let the
  resolver, since it can

- Don't try to connect to localhost.  That can't possibly work.

* mqtt: common up some callback invocations

* mqtt: don't retransmit messages on timeout

There's no point in retransmitting messages on timeout; the network
stack will be trying to do it for us anyway.

* mqtt: remove unnecessary NULL udata checks

* mqtt: hold strings in Lua, not C

Eliminates a host of C-side allocations.

While here, move the rest of the mqtt_connect_info structure out to its
own thing, and pack some flags using a bitfield.

* mqtt: mqtt_socket_on use lua_checkoption

* mqtt: slightly augment debug messages

These changes have made some debugging ever so slightly easier.
2021-01-05 12:07:09 +01:00
..
css Add Getting Started page (#2487) (#2490) 2018-09-17 17:55:11 +01:00
img Save the post data in a file on the filesystem (#2810) 2019-07-08 21:48:16 +02:00
js Only process relative links on RTD 2019-02-11 22:52:26 +01:00
lua-modules Doc fixes (#3333) 2020-11-25 12:53:46 +01:00
modules First round of MQTT fixes (#3360) 2021-01-05 12:07:09 +01:00
build.md Doc fixes (#3333) 2020-11-25 12:53:46 +01:00
compiling.md Add support for using doubles in the LUA53 build. (#3225) 2020-11-07 22:38:40 +01:00
extn-developer-faq.md trailing spaces cleanup (#2659) 2019-02-17 18:26:29 +00:00
flash.md Lua 5.1 / 5.3 alignment and document (#3193) 2020-08-22 17:41:02 +01:00
getting-started.md Doc fixes (#3333) 2020-11-25 12:53:46 +01:00
hardware-faq.md trailing spaces cleanup (#2659) 2019-02-17 18:26:29 +00:00
index.md Doc fixes (#3333) 2020-11-25 12:53:46 +01:00
lcd.md trailing spaces cleanup (#2659) 2019-02-17 18:26:29 +00:00
lfs.md Lua 5.1 / 5.3 alignment and document (#3193) 2020-08-22 17:41:02 +01:00
lua-developer-faq.md Fix init.lua link 2020-06-09 22:26:52 +02:00
lua53.md Doc fixes (#3333) 2020-11-25 12:53:46 +01:00
nodemcu-lrm.md Lua 5.1 / 5.3 alignment and document (#3193) 2020-08-22 17:41:02 +01:00
nodemcu-pil.md Lua 5.1 / 5.3 alignment and document (#3193) 2020-08-22 17:41:02 +01:00
sdcard.md Updated FatFS from 0.12a to 0.13c (#2608) 2019-01-16 22:30:42 +01:00
spiffs.md trailing spaces cleanup (#2659) 2019-02-17 18:26:29 +00:00
support.md Re-organize documentation 2019-01-13 22:01:57 +01:00
upload.md Fix filename of luac.cross in upload.md (#3258) 2020-08-29 21:25:38 +02:00