MCPcopy Create free account
hub / github.com/mitmproxy/mitmproxy / SendQuicStreamData

Class SendQuicStreamData

mitmproxy/proxy/layers/quic/_commands.py:18–40  ·  view source on GitHub ↗

Command that sends data on a stream.

Source from the content-addressed store, hash-verified

16
17
18class SendQuicStreamData(QuicStreamCommand):
19 """Command that sends data on a stream."""
20
21 data: bytes
22 """The data which should be sent."""
23 end_stream: bool
24 """Whether the FIN bit should be set in the STREAM frame."""
25
26 def __init__(
27 self,
28 connection: connection.Connection,
29 stream_id: int,
30 data: bytes,
31 end_stream: bool = False,
32 ) -> None:
33 super().__init__(connection, stream_id)
34 self.data = data
35 self.end_stream = end_stream
36
37 def __repr__(self):
38 target = repr(self.connection).partition("(")[0].lower()
39 end_stream = "[end_stream] " if self.end_stream else ""
40 return f"SendQuicStreamData({target} on {self.stream_id}, {end_stream}{self.data!r})"
41
42
43class ResetQuicStream(QuicStreamCommand):

Callers 10

test_reprsFunction · 0.90
test_force_rawMethod · 0.90
test_full_closeMethod · 0.90
test_open_connectionMethod · 0.90
_handle_eventMethod · 0.90
send_stream_dataMethod · 0.90
event_to_childMethod · 0.85

Calls

no outgoing calls

Tested by 8

test_reprsFunction · 0.72
test_force_rawMethod · 0.72
test_full_closeMethod · 0.72
test_open_connectionMethod · 0.72
_handle_eventMethod · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…