Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | Related Pages

wftk::PollBase Class Reference

Base class for watching for socket events. More...

#include <poll.h>

Inheritance diagram for wftk::PollBase:

wftk::Poll List of all members.

Public Types

typedef int Socket
 raw socket descriptior
enum  { READ = 1 << 0, WRITE = 1 << 1, EXCEPT = 1 << 2, MASK = (1 << 3) - 1 }

Static Public Member Functions

static void poll (Uint32 wait)
 Poll the sockets, blocking if wait > 0.

Protected Member Functions

virtual void setup (PollData &)=0
 add your sockets to PollData in this callback using addPoll()
virtual void pushEvent (PollData &)=0
 In this callback, use checkPoll() to see if your sockets are ready, and push an event onto the application event queue if they are.

Static Protected Member Functions

static void addPoll (PollData &, Socket, int mask)
 add a socket to the set to be polled
static int checkPoll (PollData &, Socket, int mask)
 check if a socket has data
static void refPoll (PollData &)
 increase PollData refcount
static void unrefPoll (PollData &)
 decrease PollData refcount

Detailed Description

Base class for watching for socket events.


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

Generated Tue Apr 12 22:48:55 2005.
Copyright © 1998-2003 by the respective authors.

This document is licensed under the terms of the GNU Free Documentation License and may be freely distributed under the conditions given by this license.