def wire.loop.copied

emerging-ezhttp@0.21.0.0 · src/wire.bend:99

import emerging-ezhttp@0.21.0.0/src/wire.bend as Wire
import Base
import bend-kit-bytes@0.3.2.0/bytes.bend as Bytes
import emerging-ezhttp@0.21.0.0/src/wirespec.bend as Spec
import emerging-ezhttp@0.21.0.0/src/http.bend as Http

99# a receive judged by a copy of it as text, dropped after the judging; the
100# octets themselves are appended packed
101def wire.loop.copied(+secure: Bool, s: Socket, h: Http.Hear,
102  r: Bytes.Bytes & Bytes.Bytes, acc: Bytes.Bytes,
103  more: Socket -> Http.Hear -> Bytes.Bytes -> IO(Answer)) -> IO(Answer):
104  (kept, copy) = r
105  wire.loop.on(secure, s, Spec.wire.read.next(h, Bytes.to_string(copy)),
106    Bytes.append(acc, kept), more)

Uses (12)

Used by (1)