def h2.idle.read
bend-kit-http@0.38.2.0 · http.bend:3623
import bend-kit-http@0.38.2.0/http.bend as Http
import Base
import bend-kit-http2@0.4.0.0/http2.bend as H2
import bend-kit-bytes@0.3.3.0/bytes.bend as HBytes
3623def h2.idle.read(client: H2.Client,
3624 got: Socket & Result<&1, &1, U32 & String, U32 & Array<U32>>) -> IO(Took):
3625 match got:
3626 case (s, Fail{e}):
3627 IO.pure(Took, TookSeen{False{}, ConnH2{s, client}})
3628 case (s, Done{(0, buf)}):
3629 IO.pure(Took, TookSeen{False{}, ConnH2{s, client}})
3630 case (s, Done{(+len, buf)}):
3631 h2.idle.reply(s, H2.client.receive(client, HBytes.Bytes{len, buf}))