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
I suppose you're using TCP to communicate with your device.
The socket itself is still "valid", however the the connection was lost.
You get a return value of 0 for recv() when the connection was closed by the other host (wether this disconnection was graceful or not doesn't matter)
socket functions are like C functions: they don't throw because they can be used in C programs, where exceptions do not exist.