Solved

poll

Posted on 2011-03-04
2
321 Views
Last Modified: 2012-05-11
I am using unix socket poll()

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

0
Comment
Question by:learningunix
2 Comments
 
LVL 53

Accepted Solution

by:
Infinity08 earned 250 total points
ID: 35038488
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
 

Author Closing Comment

by:learningunix
ID: 35128316
thx
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question