def client.settings.go
bend-kit-http2@0.4.0.0 · http2.bend:619
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
619def client.settings.go(n: Nat, b: Bytes.Bytes, +at: U32, c: Client) -> Reply:
620 match n:
621 case 0n:
622 client.write(client.frame(encode(16384, Frame{4, 1, 0, Bytes.new(0)})), c)
623 case 1n+p:
624 with_number(Reply, Bytes.get.u16be(b, at), read_id => id =>
625 with_number(Reply, Bytes.get.u32be(read_id, (at + 2 : U32)), rest => value =>
626 client.after(client.settings.item(id, value, c), next => writes => events =>
627 client.settings.go(p, rest, (at + 6 : U32), next))))