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 device disconnects then i loose connection with the device.

  1. Does this mean that the socket i was using until now becomes invalid.

  2. Do i get any special message like null character or something when this disconnect happens.

  3. If the socket connection i was having became invalid then why doesnt the recv() socket function throw and SOCKET_ERROR. Instead why do i receive data of 0 length.

Thanks

Edit
Report