reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
resip::FdSetIOObserver Class Referenceabstract

An interface class for elements that use an FdSet to watch for IO. More...

#include <FdSetIOObserver.hxx>

Inheritance diagram for resip::FdSetIOObserver:
[legend]

Public Member Functions

 FdSetIOObserver ()
 
virtual ~FdSetIOObserver ()
 
virtual void buildFdSet (FdSet &fdset)=0
 Add any FDs that we are interested in watching to an fdset, with the understanding that a select() call will be made immediately after.
 
virtual unsigned int getTimeTillNextProcessMS ()=0
 Returns the maximum timeout this object is willing to tolerate on the select call that is to be made, to prevent starvation of work that is not IO-based.
 
virtual void process (FdSet &fdset)=0
 Called once select() returns; this allows this object to inspect which of its FDs are ready, and perform any necessary IO with them.
 

Detailed Description

An interface class for elements that use an FdSet to watch for IO.

This is in contrast to an element that uses event-driven IO.

Definition at line 12 of file FdSetIOObserver.hxx.

Constructor & Destructor Documentation

◆ FdSetIOObserver()

resip::FdSetIOObserver::FdSetIOObserver ( )
inline

Definition at line 15 of file FdSetIOObserver.hxx.

◆ ~FdSetIOObserver()

virtual resip::FdSetIOObserver::~FdSetIOObserver ( )
inlinevirtual

Definition at line 16 of file FdSetIOObserver.hxx.

Member Function Documentation

◆ buildFdSet()

virtual void resip::FdSetIOObserver::buildFdSet ( FdSet &  fdset)
pure virtual

Add any FDs that we are interested in watching to an fdset, with the understanding that a select() call will be made immediately after.

Parameters
fdsetThe FdSet to be augmented

Implemented in resip::SipStack, resip::DtlsTransport, resip::TcpBaseTransport, resip::UdpTransport, and resip::Transport.

◆ getTimeTillNextProcessMS()

virtual unsigned int resip::FdSetIOObserver::getTimeTillNextProcessMS ( )
pure virtual

Returns the maximum timeout this object is willing to tolerate on the select call that is to be made, to prevent starvation of work that is not IO-based.

Returns
The maximum select() timeout to be used, in milliseconds. To indicate that this object does not care, return UINT_MAX. 0 indicates that a poll select() should be performed.

Implemented in resip::SipStack, and resip::Transport.

◆ process()

virtual void resip::FdSetIOObserver::process ( FdSet &  fdset)
pure virtual

Called once select() returns; this allows this object to inspect which of its FDs are ready, and perform any necessary IO with them.

Parameters
fdsetThe FdSet after the call to select().

Implemented in resip::SipStack, resip::DtlsTransport, resip::TcpBaseTransport, resip::UdpTransport, and resip::Transport.


The documentation for this class was generated from the following file: