the wificlient and server that you mention are the libaries that you include at the top of the code
not a GET request, please. nice plain telnet is good. start a server at port 2323 and connect to it from client and send what you want and process it on server and eventually send something back to client.you can test the server with telnet client (telnet <ip> 2323)
Why tie up a connection, when the only information that needs to be exchanged involves the door being opened or being closed? How often is THAT going to happen?
nothing is tied up.
So, the ESP can support an unlimited number of connections. That's news to me.
I do not understand. How does my recommendation imply unlimited connections?
If there are a limited number of connections (like the Ethernet shield can only handle 4 simultaneous connections), and you use one of them for a telnet session, so that you can be told twice a day that the door opened or closed, then that connection is not available for any other use. Hence it is tied up.It that one connection is nothing, this implies, to me, at least, that it isn't 1 of 4. Rather, it is one of so many that one doesn't matter.So, which is it? Are you tying up one of a limited number of connections, where it could matter, or one of so many that it doesn't matter?
I guess that at least the door switch part is to powered by battery.Anyway, even if not, probably the best configuration is to have the ESP8266 which monitors the door switch configured as a web client. When the door switch changes state, it wakes up and posts (using HTTP POST or HTTP GET) the status update to the web server (another ESP8266). After that it goes back to sleep. The ESP8266 configured as a web server must run all the time, waiting for status change messages from the ESP8266 monitoring the door switch and act on them issuing alarm calls etc.If you have an existing wifi network, then it is probably best to integrate the two ESP8266 devices in your existing wireless lan. If not, you can make the ESP8266 which is designates as the web server also into an Access Point (AP mode) which effectively creates its own private wlan.The mechanism is simple. It is exactly analogous to using your web browser to post a message in this thread. Your browser is the web client and at forum.arduino.cc there is a web server running which accepts your post.