W6100 khoih-prog / HTTPS_Server_Generic
This library is based on, modified from:
- Frank Hessel's esp32_https_server
- Khoi Hoang's ESP32_HTTPS_Server
9
Project description
Start the Server
A call to HTTPServer::start() will start the server so that it is listening on the previously specified port:
myServer.start();
This code usually goes into your setup() function. You can use HTTPServer::isRunning() to check whether the server started successfully.
By default, you need to pass control to the server explicitly. This is done by calling the HTTPServer::loop() function, which you usually will put into your Arduino sketch's loop() function. Once called, the server will first check for incoming connection (up to the maximum connection count that has been defined in the constructor), and then handle every open connection if it has new data on the socket. So your request handler functions will be called during the call to loop(). Note that if one of your handler functions is blocking, it will block all other connections as well.
Running the Server asynchronously
If you want to have the server running in the background (and not calling loop() by yourself every few milliseconds), you can make use of the ESP32's task feature and put the whole server in a separate task.
See the Async-Server example to see how this can be done.
How to connect W5500, W6100 or ENC28J60 to ESP32_S2/S3/C3
W6100
FULL_DUPLEX, 100Mbps
W5500
FULL_DUPLEX, 100Mbps

