Solved

poll

Posted on 2011-03-04
2
318 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
Comment Utility
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
Comment Utility
thx
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

771 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now