1#if !defined(RESIP_FDPOLL_HXX)
2#define RESIP_FDPOLL_HXX
17#if defined(HAVE_EPOLL)
18#define RESIP_POLL_IMPL_EPOLL
21#if defined(HAVE_POLL) || (_WIN32_WINNT >= 0x0600)
22#define RESIP_POLL_IMPL_POLL
29#define FPEM_Read 0x0001
30#define FPEM_Write 0x0002
31#define FPEM_Error 0x0004
32#define FPEM_Edge 0x4000
Handles cross-platform sockets compatibility.
void processItem(FdPollItemIf *item, FdPollEventMask mask)
static const char * getImplList()
Return candidate impl names with vertical bar (|) between them Intended for help messages.
static FdPollGrp * create(const char *implName=NULL)
factory
virtual FdPollItemHandle addPollItem(Socket sock, FdPollEventMask newMask, FdPollItemIf *item)=0
virtual ImplType getImplType() const =0
virtual int getEPollFd() const
get the epoll-fd (epoll_create()) This is fd (type int), not Socket.
virtual void buildFdSet(FdSet &fdSet)=0
virtual bool processFdSet(FdSet &fdset)=0
virtual void delPollItem(FdPollItemHandle handle)=0
virtual void modPollItem(FdPollItemHandle handle, FdPollEventMask newMask)=0
virtual bool waitAndProcess(int ms=0)=0
Wait at most {ms} milliseconds.
virtual const char * getImplName() const =0
FdPollItemHandle mPollHandle
virtual ~FdPollItemBase()
virtual void processPollEvent(FdPollEventMask mask)=0
Called by PollGrp when activity is possible.
Object-oriented wrapper for your platform's file-descriptor set.
dcm! – add UnusedChecking(_enum) below;
unsigned short FdPollEventMask
struct FdPollItemFake * FdPollItemHandle
This is opaque type used to identify a particular Item.