MCPcopy Index your code
hub / github.com/python/cpython / pollpacket

Method pollpacket

Lib/idlelib/rpc.py:352–366  ·  view source on GitHub ↗
(self, wait)

Source from the content-addressed store, hash-verified

350 bufstate = 0 # meaning: 0 => reading count; 1 => reading data
351
352 def pollpacket(self, wait):
353 self._stage0()
354 if len(self.buff) < self.bufneed:
355 r, w, x = select.select([self.sock.fileno()], [], [], wait)
356 if len(r) == 0:
357 return None
358 try:
359 s = self.sock.recv(BUFSIZE)
360 except OSError:
361 raise EOFError
362 if len(s) == 0:
363 raise EOFError
364 self.buff += s
365 self._stage0()
366 return self._stage1()
367
368 def _stage0(self):
369 if self.bufstate == 0 and len(self.buff) >= 4:

Callers 1

pollmessageMethod · 0.95

Calls 5

_stage0Method · 0.95
_stage1Method · 0.95
selectMethod · 0.45
filenoMethod · 0.45
recvMethod · 0.45

Tested by

no test coverage detected