Server.step.socket: def of gralha-http-server@0.1.0.0 Import: import gralha-http-server@0.1.0.0/server.bend as Server Lines 138-144 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=138&end_line=144 import Base import gralha-http-core@0.1.0.0/http.bend as Http # As step, but reply(socket)(request)(state) answers on the socket itself # and must close it: for bodies the app streams through its own effect. def step.socket(~S: Type, ~reply: Socket -> Http.Request -> S -> IO(S), listener: Listener, state: S, +max: U32) -> IO(Listener & S): do IO: got : Listener & Result<&1, &1, U32 & String, Socket> <- TCP.accept(listener) accepted.socket(~S, ~reply, got, state, max) Uses (11): 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=Result 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=TCP.accept 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-server@0.1.0.0/server.bend&name=accepted.socket