equal
deleted
inserted
replaced
7 NULL. |
7 NULL. |
8 """ |
8 """ |
9 |
9 |
10 cdef double t |
10 cdef double t |
11 |
11 |
12 if timeout : |
12 if timeout is not None : |
13 t = timeout |
13 t = timeout |
14 |
14 |
15 tv.tv_sec = <int>(t) |
15 tv.tv_sec = <int>(t) |
16 tv.tv_usec = <int>((t - <int> t) * 100000) |
16 tv.tv_usec = <int>((t - <int> t) * 100000) |
17 |
17 |
117 return lib.event_get_fd(self.ev) |
117 return lib.event_get_fd(self.ev) |
118 |
118 |
119 |
119 |
120 def __call__ (self, lib.evutil_socket_t fd, short mask) : |
120 def __call__ (self, lib.evutil_socket_t fd, short mask) : |
121 """ |
121 """ |
122 The method invoked by the internal libevent callback. |
122 The method invoked by the internal libevent callback when the event becomes active. |
|
123 |
|
124 fd - OS file descriptor the event occured on, or -1 |
|
125 mask - bitmask of EV_* flags that represents the triggered event |
|
126 |
|
127 |
|
128 The default implementation of __call__ does nothing. The method's return value will be ignored, and should |
|
129 be None. Any errors raised by the callback will be printed out as warning messages, and ignored. |
123 """ |
130 """ |
124 |
131 |
125 pass |
132 pass |
126 |
133 |
127 |
134 |