Page 1 of 1

espconn on ESP32

Posted: Mon Feb 07, 2022 5:23 pm
by hustenhabas
Hello brothers of the code. I have a HTTP Server written for ESP8266 that uses "espconn" to handle the requests. How can I change the base functions so that the server logic remains the same but the lower level connection functions are replaced to work with esp32/lwip?


Is that i bad idea? Should I replace the whole code with http server example from esp-idf and remake every line of the server using "esp_http_server.h"?

Re: espconn on ESP32

Posted: Tue Feb 08, 2022 1:18 am
by ESP_Sprite
I did that before for an ESP8266 webserver (libesphttpd) a long time ago. I went the way of writing a compatibility layer. You effectively need to implement a task that handles all the connections, perhaps this can give you some inspiration. To be fair, nowadays I would probably port my code to the httpd server in esp-idf, simply because I don't have to maintain it myself. You can go both ways, depending on how deeply integrated the webserver is in your app.