Simultaionus bidirectional TCP communication
Posted: Tue Oct 18, 2022 6:02 am
Hello:
I am connecting one ESP32 and a few ESP8266 boards in a WiFi network, and I need bidirectional communication between the 32 and each of the 8266's.
I can find several examples on creating a client on the 32, and servers on the 8266's. I have only tried one pair so far, but it seems straight forward.
As I understand it, the client can only send data to the server.
However, I require the reverse as well. I need to send data from the client to the server, AND get a response back from the server. (I need to set a relay, and verify the relay got set before moving on to the next steps of the program.)
Must I set up a client and a server on both boards using different ports, or is there something I am missing to get a response from the server back to the client?
Thanks, Mark.
I am connecting one ESP32 and a few ESP8266 boards in a WiFi network, and I need bidirectional communication between the 32 and each of the 8266's.
I can find several examples on creating a client on the 32, and servers on the 8266's. I have only tried one pair so far, but it seems straight forward.
As I understand it, the client can only send data to the server.
However, I require the reverse as well. I need to send data from the client to the server, AND get a response back from the server. (I need to set a relay, and verify the relay got set before moving on to the next steps of the program.)
Must I set up a client and a server on both boards using different ports, or is there something I am missing to get a response from the server back to the client?
Thanks, Mark.