Closed RobertHolscher closed 3 years ago
in void SocketIoClient::loop() ,add this code: std::vector
if(millis() - _lastPing > PING_INTERVAL) {
_webSocket.sendTXT("2");
_lastPing = millis();
std::vector<String>(_packets).swap(_packets);//DC
}
Hi I have succesfully implemented the Socket.io library into my ESP8266. I have noticed that when I am using and initializing the SocketIoClient, the heap is reduced from 20000 to 4500 When I am then receiving some calls and do some other computation, the heap is dangerously low and causing resets.
Why does it eat away so much heap by default and can this be reduced somewhere in the library ? Your help is appreciated
Hey! I am new to this. How can I check my heap? Any help is appreciated
Hey! I am new to this. How can I check my heap? Any help is appreciated
ESP.getFreeHeap();
Or to print it to the serial monitor:
Serial.println(ESP.getFreeHeap(),DEC);
Hi I have succesfully implemented the Socket.io library into my ESP8266. I have noticed that when I am using and initializing the SocketIoClient, the heap is reduced from 20000 to 4500 When I am then receiving some calls and do some other computation, the heap is dangerously low and causing resets.
Why does it eat away so much heap by default and can this be reduced somewhere in the library ? Your help is appreciated