def client.data.stream.state

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

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

1115def client.data.stream.state(open: Bool, available: Bool, +id: U32, +len: U32,
1116    +end_stream: Bool, content: Bytes.Bytes, s: Stream, tail: List<&1, Stream>,
1117    input: Bytes.Bytes, encoder: Hpack.State, decoder: Hpack.State, control: Control) -> Reply:
1118  match open:
1119    case False{}:
1120      client.fail(1, False{}, id)
1121    case True{}:
1122      match available:
1123        case False{}:
1124          client.fail(3, False{}, id)
1125        case True{}:
1126          client.data.content.updated(client.data.updates(len, end_stream, id),
1127            end_stream, content, s, tail, input, encoder, decoder, control)

Uses (11)

Used by (1)