def stdio.serve

ezmcp@0.1.0.0 · src/io.bend:396

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

396# serve newline-delimited JSON-RPC on stdin and stdout until stdin ends,
397# with no context
398@unsafe def stdio.serve(
399  ~run: String -> Value.Json -> IO(Rpc.Out),
400  ~srv: Server.Server
401) -> IO(Unit):
402  stdio.serve_with(~Unit, ~(_c => n => a => run(n, a)), srv, Unit{})

Uses (7)

Used by (1)