MCPcopy Index your code
hub / github.com/Bitmessage/PyBitmessage / readwrite

Function readwrite

src/network/asyncore_pollchoose.py:182–200  ·  view source on GitHub ↗
(obj, flags)

Source from the content-addressed store, hash-verified

180 obj.handle_error()
181
182def readwrite(obj, flags):
183 try:
184 if flags & select.POLLIN and can_receive():
185 obj.handle_read_event()
186 if flags & select.POLLOUT and can_send():
187 obj.handle_write_event()
188 if flags & select.POLLPRI:
189 obj.handle_expt_event()
190 if flags & (select.POLLHUP | select.POLLERR | select.POLLNVAL):
191 obj.handle_close()
192 except socket.error as e:
193 if e.args[0] not in _DISCONNECTED:
194 obj.handle_error()
195 else:
196 obj.handle_close()
197 except _reraised_exceptions:
198 raise
199 except:
200 obj.handle_error()
201
202def select_poller(timeout=0.0, map=None):
203 """A poller which uses select(), available on most platforms."""

Callers 2

poll_pollerFunction · 0.85
epoll_pollerFunction · 0.85

Calls 7

can_receiveFunction · 0.85
can_sendFunction · 0.85
handle_read_eventMethod · 0.80
handle_write_eventMethod · 0.80
handle_expt_eventMethod · 0.80
handle_errorMethod · 0.80
handle_closeMethod · 0.45

Tested by

no test coverage detected