kehl

Hi,

in my app (C++ for Windows Mobile 5.0) I try to keep a (BSD-)socket-based connection to a server (custom protocol). Due to the device losing connection every now and then and for some other reasons I don't quite understand, sometimes the socket connection gets interrupted.

Most of the time I do not notice this at all, i.e. the socket is apparently still valid and doesn't return an error when sending data through it - which just never arrives.

My socket experience is rather limited. How do I notice that a connection is severed I tried checking recv(my_socket, &dummy, 0, 0) == 0 which indicates socket closed, but this does not cover all my problems. Is there anything else I could be doing

Thanks.


Re: Smart Devices Native C++ Development Detecting socket disconnect

kehl

Push