I am having an application which established a socket connection on a port number 5005 with another device(hardware device with a web server).
Now if my hardware de
Agree with Robert S. Barnes. Except the claim that the socket is now "invalid".
It's still valid. You can use it. You can even send data to the peer. The only thing you can't do with it is call recv.
recv