missign error return from readfrom
Hello,
I'm using sendto call to send data from app1 to app2 to running on same (or sometimes different machine).... and doing recvfrom to read a responce
I've read inte linux man pages, that if there is no application on the listening on destination port
the sending socket is marked so when i do recvfrom i'm supposed get a -1 ret value and error number in the errno....
so i'm shutting down the app2, and causing app1 send the data.... I see in ethereal the ICMP port unreachable message comming back in answer to the data packet....
but recvfrom does not getting an error code.... i've tried to do select with error fd_set nonempty
and select simply sits waiting there ad infinitum....
Any ideas what i'm doing wrong, i really want to avoid to use some kind of heartbeat protocol to detetct missing remote application....
Thanks
Vadim
|