nodemcu-firmware/lua_examples
Nathaniel Wesley Filardo dcc1ea2a49 A generic fifo and fifosock wrapper, under telnet and http server (#2650)
* lua_modules/fifo: a generic queue & socket wrapper

One occasionally wants a generic fifo, so here's a plausible
implementation that's reasonably flexible in its usage.

One possible consumer of this is a variant of TerryE's two-level fifo
trick currently in the telnetd example.  Factor that out to fifosock for
more general use.

* lua_examples/telnet: use factored out fifosock

* lua_modules/http: improve implementation

Switch to fifosock for in-order sending and waiting for everything to be
sent before closing.

Fix header callback by moving the invocation of the handler higher

* fifosock: optimistically cork and delay tx

If we just pushed a little bit of data into a fifosock that had idled,
wait a tick (1 ms) before transmitting.  Hopefully, this means that
we let the rest of the system push more data in before we send the first
packet.  But in a high-throughput situation, where we are streaming data
without idling the fifo, there won't be any additional delay and we'll
coalesce during operation as usual.

The fifosocktest mocks up enough of tmr for this to run, but assumes
an arbitrarily slow processor. ;)
2019-02-16 13:51:40 +01:00
..
email Fixed bug where email text after CR and LF would not be read. Added example links, Fixed bug where send function could not be called more than once due to count variable. 2015-03-16 04:17:19 -05:00
lfs Add compression to LFS images (#2448) 2018-09-29 16:57:51 +03:00
luaOTA LuaOTA provisioning system (#2060) 2017-10-28 23:22:34 +02:00
mcp23008 Added I/O expander MCP23008 module and two examples: digital output with LEDS, and digital input with buttons. 2015-03-02 13:21:26 -06:00
mqtt Add checking of Lua sources to travis build (#2423) 2018-07-16 07:48:47 +02:00
pcm fix pcm examples to comply with current code base (#1720) 2017-01-11 21:11:38 +01:00
telnet A generic fifo and fifosock wrapper, under telnet and http server (#2650) 2019-02-16 13:51:40 +01:00
timezone Sample code for timezone handling (#1853) 2017-03-10 22:09:36 +01:00
u8g2 port u8g2 module from esp32 platform 2018-07-22 13:51:10 +02:00
ucglib Submodulify ucg and update to v1.5.2 (#2503) 2018-10-19 21:18:50 +01:00
adc_rgb.lua ADC driving RGB LED; electronic mood ring 2015-05-31 09:08:07 -05:00
irsend.lua Update irsend.lua 2015-02-13 11:13:00 +05:30
make_phone_call.lua Added phone calls and sms example. 2015-03-23 21:57:54 -05:00
myfile.lua rename folder name to pre_build 2014-12-22 20:28:37 +08:00
send_text_message.lua Added phone calls and sms example. 2015-03-23 21:57:54 -05:00
sjson-streaming.lua Add sjson streaming example 2018-02-04 12:45:27 +01:00
somfy.lua Add support for streaming JSON encoder/decoder (#1755) 2017-03-22 11:24:32 +11:00
tcp2uart.lua add tcp2uart.lua example 2015-01-23 17:12:54 +08:00
webap_toggle_pin.lua webap_toggle_pin.lua HTML warnings and typos fixed (#2394) 2018-06-04 13:16:20 +02:00