MCPcopy
hub / github.com/mitmproxy/mitmproxy / read

Method read

test/mitmproxy/proxy/layers/quic/test__stream_layers.py:416–426  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

414 self.quic.receive_datagram(buf, self.address, self.now)
415
416 def read(self) -> bytes:
417 self.now = self.now + 0.1
418 buf = b""
419 has_data = False
420 for datagram, addr in self.quic.datagrams_to_send(self.now):
421 assert addr == self.address
422 buf += datagram
423 has_data = True
424 if not has_data:
425 raise AssertionError("no datagrams to send")
426 return buf
427
428 def handshake_completed(self) -> bool:
429 while event := self.quic.next_event():

Callers 15

test_simpleMethod · 0.95
test_untrusted_certMethod · 0.95
test_server_requiredMethod · 0.95
read_tnetstringFunction · 0.45
test_simpleMethod · 0.45
test_convertMethod · 0.45
test_keyinfoMethod · 0.45
test_err_broken_sansMethod · 0.45
test_stateMethod · 0.45
test_save_staticFunction · 0.45
test_save_filter_helpFunction · 0.45

Calls 1

datagrams_to_sendMethod · 0.80

Tested by

no test coverage detected