def h2.idle.peek
bend-kit-http@0.38.2.0 · http.bend:3633
import bend-kit-http@0.38.2.0/http.bend as Http
import Base
import bend-kit-wire@0.4.7.0/wire.bend as Wire
import bend-kit-http2@0.4.0.0/http2.bend as H2
3633
3634def h2.idle.peek(client: H2.Client, r: Socket & Bool) -> IO(Took):
3635 (s, quiet) = r
3636 match quiet:
3637 case True{}:
3638 IO.pure(Took, TookSeen{True{}, ConnH2{s, client}})
3639 case False{}:
3640 do IO<Took>:
3641 got : Socket & Result<&1, &1, U32 & String, U32 & Array<U32>> <-
3642 Wire.tls.recv.words(s, 16384, 100)
3643 h2.idle.read(client, got)