Dns.try.send: def of bend-kit-dns@0.7.0.0 Import: import bend-kit-dns@0.7.0.0/dns.bend as Dns Lines 468-476 of bend-kit-dns@0.7.0.0/dns.bend: https://jend.leeeet.dev/read.txt?path=bend-kit-dns@0.7.0.0/dns.bend&start_line=468&end_line=476 import Base import bend-kit-wire@0.4.6.2/wire.bend as Wire import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes # Bytes cannot be copied, so each attempt builds its own query. A name that query rejects ends the tries. def try.send(s: Socket, +ns: String, id: U32, q: Maybe<&1, Bytes.Bytes>) -> IO(Socket & Try): match q: case None{}: try.pure(s, Got{None{}}) case Some{Bytes.Bytes{n, w}}: do IO: sent : Socket & Result<&1, &1, U32 & String, Unit> <- Wire.send_to.words(s, ns, 53, n, w) try.sent(ns, id, sent) Uses (14): 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=Maybe 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=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=bend-kit-dns@0.7.0.0/dns.bend&name=Try https://jend.leeeet.dev/definition.txt?path=bend-kit-dns@0.7.0.0/dns.bend&name=try.pure https://jend.leeeet.dev/definition.txt?path=bend-kit-dns@0.7.0.0/dns.bend&name=try.sent https://jend.leeeet.dev/definition.txt?path=bend-kit-wire@0.4.8.0/wire.bend&name=send_to.words