(tctx: Context, keepalive: int = 0)
| 69 | |
| 70 | |
| 71 | def start_h2_client(tctx: Context, keepalive: int = 0) -> tuple[Playbook, FrameFactory]: |
| 72 | tctx.client.alpn = b"h2" |
| 73 | tctx.options.http2_ping_keepalive = keepalive |
| 74 | frame_factory = FrameFactory() |
| 75 | |
| 76 | playbook = Playbook(http.HttpLayer(tctx, HTTPMode.regular)) |
| 77 | assert ( |
| 78 | playbook |
| 79 | << SendData(tctx.client, Placeholder()) # initial settings frame |
| 80 | >> DataReceived(tctx.client, frame_factory.preamble()) |
| 81 | >> DataReceived( |
| 82 | tctx.client, frame_factory.build_settings_frame({}, ack=True).serialize() |
| 83 | ) |
| 84 | ) |
| 85 | return playbook, frame_factory |
| 86 | |
| 87 | |
| 88 | def make_h2(open_connection: OpenConnection) -> None: |
no test coverage detected
searching dependent graphs…