Definition at line 123 of file FdPoll.cxx.
◆ FdPollImplFdSet()
| FdPollImplFdSet::FdPollImplFdSet |
( |
| ) |
|
◆ ~FdPollImplFdSet()
| FdPollImplFdSet::~FdPollImplFdSet |
( |
| ) |
|
◆ addPollItem()
◆ buildFdSet()
| void FdPollImplFdSet::buildFdSet |
( |
FdSet & |
fdSet | ) |
|
|
virtual |
◆ delPollItem()
◆ getImplName()
| virtual const char * resip::FdPollImplFdSet::getImplName |
( |
| ) |
const |
|
inlinevirtual |
◆ getImplType()
| virtual ImplType resip::FdPollImplFdSet::getImplType |
( |
| ) |
const |
|
inlinevirtual |
◆ killCache()
| void FdPollImplFdSet::killCache |
( |
Socket |
fd | ) |
|
|
protected |
There is a boundary case:
- fdA and fdB are added to epoll
- events occur on fdA and fdB
- waitAndProcess() select and gets events for fdA and fdB
- handler for fdA deletes fdB (closing fd)
- handler (same or differnt) opens new fd, gets fd as fdB, and adds it to us but under different object
- cache processes "old" fdB event masks but binds it to the new (wrong) object
For read or write events it would be relatively harmless to pass these events to the new object (all objects should be prepared to get EAGAIN). But passing an error event could incorrectly kill the wrong object.
To prevent this, we kill the events in the mSelectSet. In POSIX, I'm pretty sure this is always safe. In Windows, I don't know what happens if the fd isn't already in the FdSet.
Definition at line 291 of file FdPoll.cxx.
◆ modPollItem()
◆ processFdSet()
| bool FdPollImplFdSet::processFdSet |
( |
FdSet & |
fdset | ) |
|
|
virtual |
◆ waitAndProcess()
| bool FdPollImplFdSet::waitAndProcess |
( |
int |
ms = 0 | ) |
|
|
virtual |
Wait at most {ms} milliseconds.
If any file activity has already occurs or occurs before {ms} expires, then FdPollItem will be informed (via cb method) and this method will return. Returns true iff any file activity occured. ms<0: wait forever, ms=0: don't wait, ms>0: wait this long NOTE: "forever" may be a little as 60sec or as much as forever
Implements resip::FdPollGrp.
Definition at line 297 of file FdPoll.cxx.
◆ mFreeHeadIdx
| size_t resip::FdPollImplFdSet::mFreeHeadIdx |
|
protected |
◆ mItems
◆ mLiveHeadIdx
| size_t resip::FdPollImplFdSet::mLiveHeadIdx |
|
protected |
◆ mSelectSet
| FdSet resip::FdPollImplFdSet::mSelectSet |
|
protected |
The documentation for this class was generated from the following file: