def http.serve_with

ezmcp@0.1.0.0 · main.bend:184

import ezmcp@0.1.0.0/main.bend as Ezmcp
import Base
import emerging-ezjson@1.2.0.0/src/value.bend as Value
import ezmcp@0.1.0.0/src/rpc.bend as Rpc
import ezmcp@0.1.0.0/src/server.bend as Server
import ezmcp@0.1.0.0/src/io.bend as Io

184# serve the endpoint on host:port for `limit` connections, its runner given
185# `ctx`, each connection on its own fork and at most `max` at once (0: no
186# limit; 1: one at a time), then stop once every connection is closed
187def http.serve_with(
188  ~C: Data,
189  ~run: C -> String -> Value.Json -> IO(Rpc.Out),
190  ~srv: Server.Server,
191  ~path: String,
192  ~origins: List<&2, String>,
193  +ctx: C,
194  host: String,
195  port: U32,
196  limit: U32,
197  max: U32
198) -> IO(Unit):
199  Io.http.serve_with(C, run, srv, path, origins, ctx, host, port, limit, max)

Uses (9)

Used by (0)

No other definition uses this definition.