espconn on ESP32

hustenhabas
Posts: 18
Joined: Tue Sep 14, 2021 2:18 pm

espconn on ESP32

Postby hustenhabas » Mon Feb 07, 2022 5:23 pm

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"?

ESP_Sprite
Posts: 9757
Joined: Thu Nov 26, 2015 4:08 am

Re: espconn on ESP32

Postby ESP_Sprite » Tue Feb 08, 2022 1:18 am

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.

Who is online

Users browsing this forum: No registered users and 252 guests