Wire.wire.loop.on: def of emerging-ezhttp@0.22.0.0 Import: import emerging-ezhttp@0.22.0.0/src/wire.bend as Wire Lines 89-97 of emerging-ezhttp@0.22.0.0/src/wire.bend: https://jend.leeeet.dev/read.txt?path=emerging-ezhttp@0.22.0.0/src/wire.bend&start_line=89&end_line=97 import Base import bend-kit-bytes@0.3.2.0/bytes.bend as Bytes import emerging-ezhttp@0.22.0.0/src/wirespec.bend as Spec import emerging-ezhttp@0.22.0.0/src/http.bend as Http # a judged read: read again, or close and answer what was received def wire.loop.on(+secure: Bool, s: Socket, r: Spec.Read, acc: Bytes.Bytes, more: Socket -> Http.Hear -> Bytes.Bytes -> IO(Answer)) -> IO(Answer): match r: case Spec.Again{h}: more(s)(h)(acc) case Spec.Heard{}: IO.bind(Unit, Answer, wire.close(secure, s), _u => IO.pure(Answer, Received{acc})) Uses (11): 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=IO.pure https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Socket https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Unit 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.22.0.0/src/http.bend&name=Hear https://jend.leeeet.dev/definition.txt?path=emerging-ezhttp@0.22.0.0/src/wire.bend&name=Answer https://jend.leeeet.dev/definition.txt?path=emerging-ezhttp@0.22.0.0/src/wire.bend&name=wire.close https://jend.leeeet.dev/definition.txt?path=emerging-ezhttp@0.22.0.0/src/wirespec.bend&name=Read