(self, *args, **kwargs)
| 262 | return timer |
| 263 | |
| 264 | def __init__(self, *args, **kwargs): |
| 265 | Connection.__init__(self, *args, **kwargs) |
| 266 | |
| 267 | self.deque = deque() |
| 268 | self._deque_lock = Lock() |
| 269 | self._connect_socket() |
| 270 | self._socket.setblocking(0) |
| 271 | |
| 272 | with _global_loop._lock: |
| 273 | self._read_watcher = libev.IO(self._socket.fileno(), libev.EV_READ, _global_loop._loop, self.handle_read) |
| 274 | self._write_watcher = libev.IO(self._socket.fileno(), libev.EV_WRITE, _global_loop._loop, self.handle_write) |
| 275 | |
| 276 | self._send_options_message() |
| 277 | |
| 278 | _global_loop.connection_created(self) |
| 279 | |
| 280 | # start the global event loop if needed |
| 281 | _global_loop.maybe_start() |
| 282 | |
| 283 | def close(self): |
| 284 | with self.lock: |
nothing calls this directly
no test coverage detected