def serve.stream.on.with

bend-kit-http@0.38.2.0 · http.bend:7092

import bend-kit-http@0.38.2.0/http.bend as Http
import Base
import bend-kit-http@0.38.2.0/completion.bend as Completion
import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes

7092def serve.stream.on.with(
7093  ~S: Type, ~start: Req -> IO(S), ~piece: S -> Bytes.Bytes -> IO(S & Bool),
7094  ~finish: S -> IO(Reply), ~abort: S -> StreamAbort -> IO(Unit), ~observe: U32 -> Completion.Outcome -> IO(Unit), host: String, +port: U32, +max: Nat
7095) -> IO(Unit):
7096  do IO<Unit>:
7097    limits.validate(max)
7098    result : Result<&2, &2, StartupError, Unit> <-
7099      serve.stream.config(~S, ~start, ~piece, ~finish, ~abort, ~observe, server.config.with(host, port, max))
7100    serve.config.result(result)

Uses (19)

Used by (1)