ESP32 as wireless data link

I have a ESP32.

Its working fine with example code developed on Arduino IDE.

Now I have a requirement for this module using its Analog Input module.

I am acquiring 4 analog channels. I want to beam them as a comma separated data via WiFi to any PC client which is linked to it.

I guess I must use TCP or for faster data transfer use UDP.

So there are two parts to this : A. I must beam up the data via UDP to any client who is interested to read my data. B. On the client side I must have a WiFi Client configured to read the incoming data , parse it and store it / display it.

For the first point ( A ) i think I can use the example below and in the loop() code replace the " Anyone Here " with my data.

But for the client side (B) what options are there as I have no clue how to go about creating a WiFi client... maybe a web browser can be tweaked to do what I want ?


#include "WiFi.h"
#include "AsyncUDP.h"

const char * ssid = "***********";
const char * password = "***********";

AsyncUDP udp;

void setup()
    WiFi.begin(ssid, password);
    if (WiFi.waitForConnectResult() != WL_CONNECTED) {
        Serial.println("WiFi Failed");
        while(1) {
    if(udp.listen(1234)) {
        Serial.print("UDP Listening on IP: ");
        udp.onPacket([](AsyncUDPPacket packet) {
            Serial.print("UDP Packet Type: ");
            Serial.print(", From: ");
            Serial.print(", To: ");
            Serial.print(", Length: ");
            Serial.print(", Data: ");
            Serial.write(, packet.length());
            //reply to the client
            packet.printf("Got %u bytes of data", packet.length());

void loop()
    //Send broadcast
    udp.broadcast("Anyone here?");