Server.serve: def of gralha-http-server@0.1.0.0 Import: import gralha-http-server@0.1.0.0/server.bend as Server Lines 171-176 of gralha-http-server@0.1.0.0/server.bend: https://jend.leeeet.dev/read.txt?path=gralha-http-server@0.1.0.0/server.bend&start_line=171&end_line=176 import Base import gralha-http-core@0.1.0.0/http.bend as Http # Serves connections forever, one at a time (unsafe: it never ends). def serve?(~S: Type, ~handle: Http.Request -> S -> IO(S & Http.Response), listener: Listener, state: S, +max: U32) -> IO(Listener & S): do IO: got : Listener & S <- step(~S, ~handle, listener, state, max) loop.next(S, got, l => s => serve(~S, ~handle, l, s, max)) Uses (9): 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=Listener https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=gralha-http-core@0.1.0.0/http.bend&name=Request https://jend.leeeet.dev/definition.txt?path=gralha-http-core@0.1.0.0/http.bend&name=Response https://jend.leeeet.dev/definition.txt?path=gralha-http-server@0.1.0.0/server.bend&name=loop.next https://jend.leeeet.dev/definition.txt?path=gralha-http-server@0.1.0.0/server.bend&name=step