- Sat Jan 03, 2015 5:26 pm
#6199
Update.
I think the issue is that the disconnect callback doesn't work if the remote connection does the disconnection rather than the ESP8266 doing the disconnection.
I my code, I open a TCP socket to port 80 on a web server, in order to do a HTTP POST of some data to a web service, however in the POST data, I specify connection: Close which tells the web server to close the connection.
I'm not an expect in TCPIP so I'm not even sure if it is possible for the ESP8266 to determine if the connection has been disconnected by the remote server.
I've searched the web and I can't seem to find much information about TCP socket disconnect callbacks (or notifications), so perhaps this isn't technically possible with TCP.