Dns.try.from: def of bend-kit-dns@0.7.0.0 Import: import bend-kit-dns@0.7.0.0/dns.bend as Dns Lines 443-447 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=443&end_line=447 import Base import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes # A datagram from anyone but the nameserver's port 53 is ignored (retried). def try.from(s: Socket, +ns: String, id: U32, hpd: String & U32 & (U32 & Array)) -> IO(Socket & Try): (h, +p, d) = hpd (n, w) = d try.pure(s, Bool.pick(Try, Bool.and(String.eq(h, ns), U32.is_eq(p, 53)), Got{answer(id, Bytes.Bytes{n, w})}, Again{})) Uses (15): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Array https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.pick https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Sigma 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=String.eq https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.is_eq 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=answer https://jend.leeeet.dev/definition.txt?path=bend-kit-dns@0.7.0.0/dns.bend&name=try.pure