Wire.wire.loop: def of emerging-ezhttp@0.21.0.0 Import: import emerging-ezhttp@0.21.0.0/src/wire.bend as Wire Lines 138-149 of emerging-ezhttp@0.21.0.0/src/wire.bend: https://jend.leeeet.dev/read.txt?path=emerging-ezhttp@0.21.0.0/src/wire.bend&start_line=138&end_line=149 import Base import bend-kit-bytes@0.3.2.0/bytes.bend as Bytes import emerging-ezhttp@0.21.0.0/src/wirespec.bend as Spec import emerging-ezhttp@0.21.0.0/src/http.bend as Http # receive until wirespec.bend says the answer is whole, the octets appended # to what came before def wire.loop(fuel: Nat, +secure: Bool, s: Socket, +host: String, +port: U32, +ms: U32, h: Http.Hear, acc: Bytes.Bytes) -> IO(Answer): match fuel: case 0n: wire.failed(secure, s, Spec.wire.spent()) case 1n+p: IO.bind(Socket & Result<&1, &1, U32 & String, U32 & Array>, Answer, wire.recv(secure, s, ms), r => wire.loop.un(secure, host, port, ms, h, acc, r, s2 => h2 => a2 => wire.loop(p, secure, s2, host, port, ms, h2, a2))) Uses (17): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Array https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool 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=Nat 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=U32 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=emerging-ezhttp@0.21.0.0/src/http.bend&name=Hear https://jend.leeeet.dev/definition.txt?path=emerging-ezhttp@0.21.0.0/src/wire.bend&name=Answer https://jend.leeeet.dev/definition.txt?path=emerging-ezhttp@0.21.0.0/src/wire.bend&name=wire.failed https://jend.leeeet.dev/definition.txt?path=emerging-ezhttp@0.21.0.0/src/wire.bend&name=wire.loop.un https://jend.leeeet.dev/definition.txt?path=emerging-ezhttp@0.21.0.0/src/wire.bend&name=wire.recv https://jend.leeeet.dev/definition.txt?path=emerging-ezhttp@0.21.0.0/src/wirespec.bend&name=wire.spent