Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By llrjt100
#40902 I'm trying to work out how to simultaneously have a web server listening on port 80 so I can display a status page, and a tcp server listening on port 9999 so I can respond to serial commands. The web server page string and command string processing needs to be done on the Arduino with the ESP8266 handling all the tcp and connection stuff.

If it's not possible to have two ports open at once, I'm wondering if I can use a single port, and somehow distinguish between http GETs or command string responses and direct to the appropriate web server or serial string processing in my code (although I guess this requires two clients connected to the same port at once which isn't possible?)

My knowledge of this stuff is limited, so any thoughts would be much appreciated! I'm trying to use and ESP8266 to replace an Ethernet Shield which allows me to do the following:

EthernetServer cmdserver(9999);
EthernetClient cmdclient;

EthernetServer webserver(80);
EthernetClient webclient;

Many thanks,
Richard