unix socket programming
hi friends,
is there any way to find the recv() side socket descriptor that its peer is closed at the other side .. server will keep sending and client will receives it ... if client process closed i can get errno :EPIPE but if the server process closed .. recv() in client will receive just value '0' and return sucess .... is there any other way to find the recv socket property to tell the user that peer process is closed on the other side ... i try poll() checking POLLRDHUP but in vain ... is there any other way left to find ... because i want to show the user that the peer process is closed at the other side in recv() on client.c please help me ... :cry: |
Quote:
But you want some other way to show this. What's wrong with that way? |
I believe the return value is only 0 if the connection closes in a correct way, but if it was closed incorrectly you won't get any notification in such a way.
Did you try 'select' an the socket descriptor and observing its return value ? |
Quote:
Quote:
|
All times are GMT -5. The time now is 10:15 AM. |