zeromq nonblocking

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Virtual interface to be exposed by object that want to be notified
// about events on file descriptors.

struct i_poll_events
{
virtual ~i_poll_events () {}

// Called by I/O thread when file descriptor is ready for reading.
virtual void in_event () = 0;

// Called by I/O thread when file descriptor is ready for writing.
virtual void out_event () = 0;

// Called when timer expires.
virtual void timer_event (int id_) = 0;
};

0mq 中实现(或部分实现)了这些接口的类包括: io_thread_t, reaper_t, zmq_connect_t, zmq_listener_t, zmq_engine_t等。