• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 330
  • Last Modified:

poll

I am using unix socket poll()

If poll returns 0, it means timeout. But does this guarantee that socket connection is STILL Alive?

0
learningunix
Asked:
learningunix
1 Solution
 
Infinity08Commented:
If the connection was closed, poll will actually return a value > 0.

It might also have set POLLHUP in fds->revents to indicate that the remote side hung up the connection. Check the man page for poll on your system :

        man poll
0
 
learningunixAuthor Commented:
thx
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now