def sh.next

bend-kit-http@0.38.5.0 · http.bend:4913

import bend-kit-http@0.38.5.0/http.bend as Http
import Base
import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes

4913def sh.next(+head: Bool, buf: Bytes.Bytes, +k: U32, m: Socket & Result<&1, &1, U32 & String, U32 & Array<U32>>) -> Socket & Sh:
4914  (s, r) = m
4915  match r:
4916    case Fail{(+code, why)}:
4917      (s, ShBad{Some{err.or_late(code, ErrRead{code, why})}, sh.none(buf, k)})
4918    case Done{p}:
4919      (s, sh.piece(head, buf, k, p))

Uses (15)

Used by (1)