ESP8266 NodeMCU Running Out of Heap Memory

后端 未结 3 1718
刺人心
刺人心 2020-11-29 12:10

I am trying to toggle an LED using ESP8266-01 by sending POST from my laptop (using node.js)

I now have a memory issue because whenever I send POST request, the memo

3条回答
  •  囚心锁ツ
    2020-11-29 12:33

    Your on sent callback should accept one parameter, a connection. And you should setup the on sent handler at the same level as on receive -- conn that's passed to on receive is not necessarily the same conn passed to srv:listen.

    Lastly, redundant copies of string literals is a waste of memory, (though that likely won't cause it to leak.)

提交回复
热议问题