def client.ping

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

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

519def client.ping(+flags: U32, payload: Bytes.Bytes, c: Client) -> Reply:
520  match flags:
521    case 0:
522      client.write(client.frame(encode(16384, Frame{6, 1, 0, payload})), c)
523    case 1:
524      Advanced{c, Nil{}, [Pong{payload}]}
525    case _:
526      client.fail(1, True{}, 0)

Uses (14)

Used by (1)