Serve.Serve.loop: def of bend-kube-runtime@0.2.0.0 Import: import bend-kube-runtime@0.2.0.0/src/serve.bend as Serve Lines 216-224 of bend-kube-runtime@0.2.0.0/src/serve.bend: https://jend.leeeet.dev/read.txt?path=bend-kube-runtime@0.2.0.0/src/serve.bend&start_line=216&end_line=224 import Base import bend-kube-runtime@0.2.0.0/src/runtime.bend as R # Accepts forever (fuel permitting), serving each connection on its own. def Serve.loop(fuel: Nat, ev: AEv, +status: Chan(R.SMsg)) -> IO(Unit): match fuel ev: case 0n AGot{l, r}: Listener.close(l) case 1n+f AGot{l, r}: IO.bind(Unit, Unit, Serve.accepted(r, status), u => IO.bind(Listener & Serve.Res(Socket), Unit, TCP.accept(l), p => Serve.loop(f, AEv.got(p), status))) Uses (15): 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=Listener https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Listener.close https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat 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=TCP.accept https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Unit https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/runtime.bend&name=SMsg https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/serve.bend&name=AEv https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/serve.bend&name=AEv.got https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/serve.bend&name=Serve.Res https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/serve.bend&name=Serve.accepted