nodemcu / nodemcu-firmware

Lua based interactive firmware for ESP8266, ESP8285 and ESP32
https://nodemcu.readthedocs.io
MIT License
7.65k stars 3.12k forks source link

net.socket.send(conn,callback) errors #368

Closed drv53b6 closed 8 years ago

drv53b6 commented 9 years ago

net.socket.send(conn,callback) errors:

  1. for callback(conn, pl) need documentation for 2nd parameter
  2. if send_buffer overloaded system rebooting
  3. mast block execution till send_buffer wil be send
  4. or need net.socket.flush(conn) function for block till send_buffer will be send
drv53b6 commented 9 years ago

https://github.com/marcoskirsch/nodemcu-httpserver/blob/master/httpserver.lua show some very hard wey to jast send big data with coroutine.yield() coroutine.create() coroutine.resume() need something more easy for this

drv53b6 commented 9 years ago

but if remote close connection no way to force stop coroutine tread, need check connection status every time?