def server.accepted
bend-kit-http@0.38.5.0 · http.bend:6414
import bend-kit-http@0.38.5.0/http.bend as Http
import Base
import bend-kit-http@0.38.5.0/admission.bend as Admission
6414def server.accepted(~C: Data, ~operation: C -> Limits -> Chan(Admission.Command) -> Socket -> IO(Unit), +context: C, +config: ServerConfig, +inbox: Chan(Admission.Command), drained: Chan(Admission.Counts), result: Listener & Result<&1, &1, U32 & String, Socket>) -> IO(Server<C> & Result<&1, &1, U32 & String, Chan(Unit)>):
6415 (listener, got) = result
6416 match got:
6417 case Fail{error}:
6418 IO.pure(Server<C> & Result<&1, &1, U32 & String, Chan(Unit)>, (Server{listener, context, config, inbox, drained}, Fail{error}))
6419 case Done{socket}:
6420 do IO<Server<C> & Result<&1, &1, U32 & String, Chan(Unit)>>:
6421 admitted : Bool <- Admission.take(inbox, 0)
6422 server.admitted(~C, ~operation, admitted, context, config, inbox, drained, listener, socket)