Command that sends data on a stream.
| 16 | |
| 17 | |
| 18 | class 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 | |
| 43 | class ResetQuicStream(QuicStreamCommand): |
no outgoing calls
searching dependent graphs…