MCPcopy Create free account
hub / github.com/apache/httpd / _read

Method _read

test/pyhttpd/ws_util.py:102–109  ·  view source on GitHub ↗
(self, n: int)

Source from the content-addressed store, hash-verified

100 self.data = data
101
102 def _read(self, n: int):
103 if len(self.data) < n:
104 raise EOFError(f'have {len(self.data)} bytes left, but {n} requested')
105 elif n == 0:
106 return b''
107 chunk = self.data[:n]
108 del self.data[:n]
109 return chunk
110
111 def next_frame(self):
112 data = self._read(2)

Callers 1

next_frameMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected