def start2

bendonnect-rpc@0.1.0.0 · src/transport/server.bend:324

import bendonnect-rpc@0.1.0.0/src/transport/server.bend as Server
import Base
import bend-kit-http@0.36.0.0/http.bend as Http

324def start2(~handle: Call -> IO(Reply), p: Pre) -> IO(Http.WriteHead<Job>):
325  match p:
326    case PEarly{status, headers, body}:
327      head(status, headers, body)
328    case PReady{call, timeout, stream, codec}:
329      do IO<Http.WriteHead<Job>>:
330        reply : Reply <- timed(~handle, call, timeout)
331        render(stream, codec, reply)

Uses (10)

Used by (1)