* espconn: remove unused espconn code, take 1
This is the easiest part of https://github.com/nodemcu/nodemcu-firmware/issues/3004 .
It removes a bunch of functions that were never called in our tree.
* espconn: De-orbit espconn_gethostbyname
Further work on https://github.com/nodemcu/nodemcu-firmware/issues/3004
While here, remove `mqtt`'s charming DNS-retry logic (which is neither
shared with nor duplicated in other modules) and update its :connect()
return value behavior and documentation.
* espconn: remove scary global pktinfo
A write-only global! How about that.
* net: remove deprecated methods
All the TLS stuff moved over there a long time ago, and
net_createUDPSocket should just do what it says on the tin.
* espconn_secure: remove ESPCONN_SERVER support
We can barely function as a TLS client; being a TLS server seems like a
real stretch. This code was never called from Lua anyway.
* espconn_secure: more code removal
* espconn_secure: simplify ssl options structure
There is nothing "ssl_packet" about this structure. Get rid of the
terrifying "pbuffer" pointer.
Squash two structure types together and eliminate an unused field.
* espconn_secure: refactor mbedtls_msg_info_load
Split out espconn_mbedtls_parse, which we can use as part of our effort
towards addressing https://github.com/nodemcu/nodemcu-firmware/issues/3032
* espconn_secure: introduce TLS cert/key callbacks
The new feature part of https://github.com/nodemcu/nodemcu-firmware/issues/3032
Subsequent work will remove the old mechanism.
* tls: add deprecation warnings
* luacheck: net.ifinfo is a thing now
* tls: remove use of espconn->reverse
* mqtt: stop using espconn->reverse
Instead, just place the espconn structure itself at the top of the user
data. This enlarges the structure somewhat but removes one more layer
of dynamic heap usage and NULL checks.
While here, simplify the code a bit.
* mqtt: remove redundant pointer to connect_info
Everywhere we have the mqtt_state_t we also have the lmqtt_userdata.
* mqtt: doc fixes
* mqtt: note bug
* tls: allow :on(...,nil) to unregister a callback
The PR removed the bulk of non-newlib headers from the NodeMCU source base.
app/libc has now been cut down to the bare minimum overrides to shadow the
corresponding functions in the SDK's libc. The old c_xyz.h headerfiles have been
nuked in favour of the standard <xyz.h> headers, with a few exceptions over in
sdk-overrides. Again, shipping a libc.a without headers is a terrible thing to do. We're
still living on a prayer that libc was configured the same was as a default-configured
xtensa gcc toolchain assumes it is. That part I cannot do anything about, unfortunately,
but it's no worse than it has been before.
This enables our source files to compile successfully using the standard header files,
and use the typical malloc()/calloc()/realloc()/free(), the strwhatever()s and
memwhatever()s. These end up, through macro and linker magic, mapped to the
appropriate SDK or ROM functions.
* pmsleep refactor
* Shortened swtmr disabled message
* Added swtimer debug module option to user_modules.h.
* Added comments to user_config.h.
* Fixed error in documentation for node.sleep()
* remove blank sntp.c that got added in during rebase onto dev(6218b92)
* Added #ifdefs around SWTIMER_REG_CB to prevent inclusion of disabled
code
* Check the return code of the read function when doing crypto.fhash so that we don't pass negative lengths to the hashing functions
* Fix various assert failures in the LVM arising from rotables. No functional change
* Add the gpio interrupt time to the callback (and pass it from the interrupt handler)
* Get the PC right in the perf module
* Make the headers static in the websocket module
* Fix the documentation
Looks good to me. Thank you.
Also:
- allow for '\0's in received messages
* add client:config for setting websocket headers
Also:
- headers are case-insensitive now
* fix docs
* fix typo
* remove unnecessary luaL_argcheck calls
* replace os_sprintf with simple string copy