NAME

OTCEV_IOEvent - Event object to notify of pending conditions on a file descriptor.

SYNOPSIS


#include <OTC/dispatch/ioevent.hh>

class OTCEV_IOEvent : public OTC_Event
{
  public:
    ~OTCEV_IOEvent();
    inline OTCEV_IOEvent(int theFd, int theEvents);
    inline int events() const;
    inline int fd() const;
    static int agent(int theFd);
    void* type() const;
    inline static void* typeId();
    void dump(ostream& outs) const;
    static void subscribe(int theAgentId, int theFd, int theEvents);
    static void unsubscribe(
      int theAgentId,
      int theFd,
      int theEvents=~0
    );
    static void unsubscribeFd(int theFd);
    static void unsubscribeAgent(int theAgentId);
    static OTC_Job* job(int theFd, int theEvents);
    static int events(int theFd);
    inline static int maxFd();
  protected:
    void cancelSource(int theAgentId);
};

CLASS TYPE

Concrete

DESCRIPTION

OTCEV_IOEvent is a derived version of OTC_Event specifically for notifying agents of pending conditions on a file descriptor.

CONSTRUCTION

inline OTCEV_IOEvent(int theFd, int theEvents);

QUERY

inline int events() const;
inline int fd() const;
static int agent(int theFd);

IDENTIFICATION

void* type() const;
inline static void* typeId();

DEBUGGING

void dump(ostream& outs) const;

SUBSCRIPTION

In the following functions, theEvents is a bit mask formed from a bitwise AND of the individual events that are of interest. Individual events which you may subscribe to are: input, output and priority input. These are selected using the variables: OTCLIB_POLLIN, OTCLIB_POLLOUT and OTCLIB_POLLPRI.
static void subscribe(int theAgentId, int theFd, int theEvents);
static void unsubscribe(int theAgentId, int theFd, int theEvents=~0);
static void unsubscribeFd(int theFd);
static void unsubscribeAgent(int theAgentId);

SCHEDULING

static OTC_Job* job(int theFd, int theEvents);
static int events(int theFd);
inline static int maxFd();

NON DELIVERY

void cancelSource(int theAgentId);

SEE ALSO

OTC_Event, OTC_EVAgent

LIBRARY

OTC

AUTHOR(S)

Graham Dumpleton

COPYRIGHT

Copyright 1993 OTC LIMITED
Copyright 1994 DUMPLETON SOFTWARE CONSULTING PTY LIMITED