MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / fill_rawq

Method fill_rawq

tools/python-3.11.9-amd64/Lib/telnetlib.py:516–531  ·  view source on GitHub ↗

Fill raw queue from exactly one recv() system call. Block if no data is immediately available. Set self.eof when connection is closed.

(self)

Source from the content-addressed store, hash-verified

514 return c
515
516 def fill_rawq(self):
517 """Fill raw queue from exactly one recv() system call.
518
519 Block if no data is immediately available. Set self.eof when
520 connection is closed.
521
522 """
523 if self.irawq >= len(self.rawq):
524 self.rawq = b''
525 self.irawq = 0
526 # The buffer size should be fairly small so as to avoid quadratic
527 # behavior in process_rawq() above
528 buf = self.sock.recv(50)
529 self.msg("recv %r", buf)
530 self.eof = (not buf)
531 self.rawq = self.rawq + buf
532
533 def sock_avail(self):
534 """Test whether data is available on the socket."""

Callers 7

read_untilMethod · 0.95
read_allMethod · 0.95
read_someMethod · 0.95
read_very_eagerMethod · 0.95
read_eagerMethod · 0.95
rawq_getcharMethod · 0.95
expectMethod · 0.95

Calls 2

msgMethod · 0.95
recvMethod · 0.45

Tested by

no test coverage detected