def http.serve

ezmcp@0.1.0.0 · src/io.bend:218

import ezmcp@0.1.0.0/src/io.bend as Io
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

218# serve `limit` connections, as many at once as arrive, then stop
219def http.serve(
220  ~run: String -> Value.Json -> IO(Rpc.Out),
221  ~srv: Server.Server,
222  ~path: String,
223  ~origins: List<&2, String>,
224  host: String,
225  port: U32,
226  limit: U32
227) -> IO(Unit):
228  http.serve_with(~Unit, ~(_c => n => a => run(n, a)), srv, path, origins,
229    Unit{}, host, port, limit, 0)

Uses (9)

Used by (1)