Kyoto Tycoon
Public Types | Public Member Functions | Friends
kyototycoon::Pollable Class Reference

Interface of poolable I/O event. More...

#include <ktsocket.h>

List of all members.

Public Types

enum  EventFlag { EVINPUT = 1 << 0, EVOUTPUT = 1 << 1, EVEXCEPT = 1 << 2 }
 Event flags. More...

Public Member Functions

 Pollable ()
 Default constructor.
virtual ~Pollable ()
 Destructor.
virtual int32_t descriptor ()=0
 Get the descriptor integer.
virtual void set_event_flags (uint32_t flags)=0
 Set event flags.
virtual uint32_t event_flags ()=0
 Get the current event flags.

Friends

class Poller

Detailed Description

Interface of poolable I/O event.


Member Enumeration Documentation

Event flags.

Enumerator:
EVINPUT 

input

EVOUTPUT 

output

EVEXCEPT 

exception


Constructor & Destructor Documentation

Default constructor.

virtual kyototycoon::Pollable::~Pollable ( ) [virtual]

Destructor.


Member Function Documentation

virtual int32_t kyototycoon::Pollable::descriptor ( ) [pure virtual]

Get the descriptor integer.

Returns:
the descriptor integer, or -1 on failure.

Implemented in kyototycoon::ServerSocket, and kyototycoon::Socket.

virtual void kyototycoon::Pollable::set_event_flags ( uint32_t  flags) [pure virtual]

Set event flags.

Parameters:
flagsspecifies the event mode. The following may be added by bitwise-or: Pollable::EVINPUT for input events, Pollable::EVOUTPUT for output events, Pollable::EVEXCEPT for exception events.

Implemented in kyototycoon::ServerSocket, and kyototycoon::Socket.

virtual uint32_t kyototycoon::Pollable::event_flags ( ) [pure virtual]

Get the current event flags.

Returns:
the current event flags.

Implemented in kyototycoon::ServerSocket, and kyototycoon::Socket.