def client.headers.finish

bend-kit-http2@0.4.0.0 · http2.bend:997

import bend-kit-http2@0.4.0.0/http2.bend as Http2
import Base
import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes
import bend-kit-http2@0.4.0.0/hpack.bend as Hpack

997def client.headers.finish(end_headers: Bool, s: Stream, tail: List<&1, Stream>,
998    input: Bytes.Bytes, encoder: Hpack.State, decoder: Hpack.State, control: Control) -> Reply:
999  match end_headers:
1000    case False{}:
1001      Stream{+id, send_window, recv_window, local_end, remote_end, head,
1002        headers, partial, body, outgoing} = s
1003      Control{next, active, frame_max, initial, max_streams, connection, recv,
1004        first, ack, continuation, goaway} = control
1005      client.ok(Client{input,
1006        Con{Stream{id, send_window, recv_window, local_end, remote_end,
1007          head, headers, partial, body, outgoing}, tail},
1008        encoder, decoder,
1009        Control{next, active, frame_max, initial, max_streams, connection, recv,
1010          first, ack, Some{id}, goaway}})
1011    case True{}:
1012      Stream{id, send_window, recv_window, local_end, remote_end, head,
1013        headers, partial, body, outgoing} = s
1014      Control{next, active, frame_max, initial, max_streams, connection, recv,
1015        first, ack, continuation, goaway} = control
1016      client.headers.decoded(Hpack.decode(partial, decoder),
1017        Stream{id, send_window, recv_window, local_end, remote_end, head,
1018          headers, Bytes.new(0), body, outgoing}, tail, input, encoder,
1019        Control{next, active, frame_max, initial, max_streams, connection, recv,
1020          first, ack, None{}, goaway})

Uses (13)

Used by (1)