WiFiSpi
WiFiSpi copied to clipboard
Reason for limitation of 4 sockets?
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?
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.