Http.admission.request: def of bend-kit-http@0.38.2.0 Import: import bend-kit-http@0.38.2.0/http.bend as Http Lines 6218-6237 of bend-kit-http@0.38.2.0/http.bend: https://jend.leeeet.dev/read.txt?path=bend-kit-http@0.38.2.0/http.bend&start_line=6218&end_line=6237 import Base import bend-kit-http@0.38.2.0/admission.bend as Admission import bend-kit-http@0.38.2.0/completion.bend as Completion import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes def admission.request( ~C: Data, ~h: C -> Req -> IO(Reply), ~observe: C -> U32 -> Completion.Outcome -> IO(Unit), admitted: Bool, +inbox: Chan(Admission.Command), +context: C, +settings: Limits, s: Socket, req: Req, rest: Bytes.Bytes, v11: Bool ) -> IO(Maybe<&1, Socket & Turn>): match admitted: case False{}: Limits{max, cap, hm, bm, im, wm} = settings do IO>: admission.reject(Completion.Observed{status => outcome => observe(context, status, outcome)}, s, admission.head(req), wm) return None{} case True{}: Req{+method, path, +headers, body} = req do IO>: res : Reply <- h(context, Req{method, path, headers, body}) next : Maybe<&1, Socket & Turn> <- talk.respond(Completion.Observed{status => outcome => observe(context, status, outcome)}, settings, s, rest, headers, v11, String.eq(method, "HEAD"), res) Admission.give(inbox, 1) return next @unsafe Uses (23): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Chan https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO.bind https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO.pure https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Socket https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.eq https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Unit https://jend.leeeet.dev/definition.txt?path=bend-kit-bytes@0.3.3.0/bytes.bend&name=Bytes https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/admission.bend&name=Command https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/admission.bend&name=give https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/completion.bend&name=Outcome https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/completion.bend&name=Receipt https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=Limits https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=Reply https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=Req https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=Turn https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=admission.head https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=admission.reject https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=talk.respond