Http.server.run.loop: def of bend-kit-http@0.38.2.0 Import: import bend-kit-http@0.38.2.0/http.bend as Http Lines 6496-6516 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=6496&end_line=6516 import Base import bend-kit-http@0.38.2.0/admission.bend as Admission def server.run.loop(~C: Data, ~operation: C -> Limits -> Chan(Admission.Command) -> Socket -> IO(Unit), step: ServerLoop) -> IO(ServerExit): match step: case ServerListening{server}: do IO: result : Server & Result<&1, &1, U32 & String, Chan(Unit)> <- server.accept.operation(~C, ~operation, server) server.run.loop(~C, ~operation, ServerAccepted{result}) case ServerAccepted{accepted}: (server, result) = accepted match result: case Fail{+error}: server.run.loop(~C, ~operation, ServerFailed{error.capacity(error), server, error}) case Done{finished}: do IO: Chan.close(Unit, finished) server.run.loop(~C, ~operation, ServerListening{server}) case ServerFailed{retry, server, +error}: match retry: case True{}: server.run.loop(~C, ~operation, ServerListening{server}) case False{}: server.finish(~C, error.stopped(error), error, server) Uses (21): 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=Chan.close 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=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Sigma https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Socket https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String 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-http@0.38.2.0/admission.bend&name=Command 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=Server https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=ServerExit https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=ServerLoop https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=error.capacity https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=error.stopped https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=server.accept.operation https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=server.finish