def client.complete

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

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

898def client.complete(s: Stream, tail: List<&1, Stream>, input: Bytes.Bytes,
899    encoder: Hpack.State, decoder: Hpack.State, control: Control) -> Reply:
900  Stream{+id, send_window, recv_window, local_end, remote_end, head,
901    headers, partial, body, outgoing} = s
902  match local_end:
903    case True{}:
904      client.complete.ready(id, headers, body, tail, input, encoder, decoder, control, Nil{})
905    case False{}:
906      client.complete.packet(client.frame(encode(16384,
907        Frame{3, 0, id, Bytes.set.u32be(Bytes.new(4), 0, 8)})),
908        id, headers, body, tail, input, encoder, decoder, control)

Uses (14)

Used by (2)