WiFiSpi icon indicating copy to clipboard operation
WiFiSpi copied to clipboard

Reason for limitation of 4 sockets?

Open fredlcore opened this issue 4 years ago • 1 comments

Is there a hardware reason why the number of sockets is limited to 4? Or could the code be adjusted to allow for a (slightly) larger number, say, 8? If yes, could this be made configurable?

fredlcore avatar Jan 27 '21 10:01 fredlcore

The only reason is the limited memory on ESP8266. I think the number of connections could be rised up by changing the MAX_SOCK_NUM value in wl_definitions.h file. The same holds for the WiFiSpiESP project, the #define is in WiFiSPICmd.h. Feel free to try it and let me know if it works. Be warned that it would not work with TLS connections as they require rather big buffer (default 16KB) for communication and with more simultaneous connections you are out of memory on ESP8266.

JiriBilek avatar Jan 27 '21 10:01 JiriBilek