Client-Server wi-fi communication between server and nodemcu multiple clients

Hello All,

My goal is to send sensor data collected from two Nodemcu Clients to Nodemcu Server using Wi-fi communication.

Nodemcu Server will be configured in AP mode and clients as STA mode,

Now as a start I gone through below link and modified server code to read A0 pin of Nodemcu server and displaying same in Nodemcu client1 OLED. It successfully working.

Now how can I change my server code so it can handle two clients. Also as far as I understand, that tutorial is about displaying server data in client OLED but can it be possible to display client data in server, I mean server should send HTTP request to client for temperature, humidity values and the same should be displayed in webpage. something like this https://i.ytimg.com/vi/rhZ4Or43Wsg/maxresdefault.jpg

Can anybody help me out in this.

BTW, I have gone through google regarding client server communication, I observed some people use ESPAsyncWebServer.h and ESP8266WebServer.h.
But still couldn't find out exact difference between ESPAsyncWebServer.h and ESP8266WebServer.h, pls explain about it and when to exactly use those header files.

thanks for your help in advance :slight_smile:

Well, clients request things from servers, and servers supply things to clients. In your picture, the board labled "server" is actually functioning in client mode. I have some code old code for the W5100 ethernet board, but nothing yet for the ESP8266. You should be able to combine some client code and some server code to perform both functions. You probably need to explain just how you want the combined client/server code to function in your project.