I'm coding for reception from potentially unanticipated WiFi sources for ESP32-WROOM-DA.
Can I use ESPAsyncWebServer for TCP and AsyncUDPPacket for UDP at the same time?
I know ESPAsyncWebServer is used separate HTTP transmissions from other protocols, but can it be used to directly access plain TCP transmissions?
Is there an ESPAsyncWebServer derivative which does UDP?
TCP and UDP, How Do I Get Both?
-
- Posts: 829
- Joined: Mon Jul 22, 2019 3:20 pm
Re: TCP and UDP, How Do I Get Both?
You can certainly run both a web server and a udp endpoint at the same time on different ports. You will generally only have one protocol listener on any port. HTTP(s) is a stateful connection protocol, so it runs only on TCP. If you want a TCP listener on a random socket, and you are going to write a protocol handler for it yourself, you want to use the WiFiClient library.
-
- Posts: 20
- Joined: Mon Sep 18, 2023 3:54 am
Re: TCP and UDP, How Do I Get Both?
https://github.com/PepeTheFroggie/ESP32 ... webCAM_UDP
That is ESP32 video transferred by TCP. Http.
And RC commands sent via UDP to the same ESP32.
http video:
https://youtu.be/NCWrQaDqzJg
external video:
https://youtube.com/shorts/Xo_1b1SBKy8
That is ESP32 video transferred by TCP. Http.
And RC commands sent via UDP to the same ESP32.
http video:
https://youtu.be/NCWrQaDqzJg
external video:
https://youtube.com/shorts/Xo_1b1SBKy8
Who is online
Users browsing this forum: No registered users and 114 guests