dnsjit.output.udpcli(3)

πŸ“¦
version 1.5.1 Β· 5 versions
, in epel 10, epel 9, fedora 43, fedora 44, ubuntu resolute, ubuntu stonking

πŸ’– dnsjit.output.udpcli β€” bestie edition πŸ’–

okay so this is dnsjit.output.udpcli, and it lives in section 3 of the Library Functions Manual, which means it's a library function, not a command you type into your shell. got it? good. 🫢


✨ NAME ✨

dnsjit.output.udpcli β€” a Simple and dumb UDP DNS client πŸ’…


🌸 SYNOPSIS 🌸

local output = require("dnsjit.output.udpcli").new("127.0.0.1", "53")

πŸ¦‹ DESCRIPTION πŸ¦‹

So basically: it's a simple and rather dumb DNS client. and when I say dumb I mean it with love πŸ’– β€” it takes any payload you give it and sends the full payload over UDP. that's it. that's the whole personality. no parsing, no thinking, no opinions. it just yeets the bytes. 😌

πŸŽ€ Attributes πŸŽ€

  • timeout β€” a core.timespec that gets used when producing objects. ⏰

πŸ’œ Functions πŸ’œ

  • Udpcli.new() β€” creates a brand new Udpcli output. baby's first client ✨
  • Udpcli:timeout(seconds, nanoseconds) β€” sets the timeout used when producing objects. ⏳
  • Udpcli:connect(host, port) β€” connects to the host and port, and returns 0 if it worked. 🫢
  • Udpcli:nonblocking(bool) β€” turns nonblocking mode on (true) or off (false), returns 0 if it succeeded. and if you don't pass bool at all, it just tells you the current state: true if nonblocking mode is on, false if it's off. very "read the room" of it. πŸ‘‘
  • Udpcli:receive() β€” returns the C functions and context for receiving objects. and those objects? they get sent. πŸ“€
  • Udpcli:produce() β€” returns the C functions and context for producing objects, and those objects are the ones being received. here's the tea though:
    • if nonblocking mode is enabled, the producer returns a payload object with length zero if there was nothing to receive.
    • if nonblocking mode is disabled, the producer waits for data, and if it times out (see timeout above πŸ‘€) it returns a payload object with length zero.
    • and the producer returns nil on error. 😭
  • Udpcli:packets() β€” returns the number of "packets" sent. and yes, "packets" is in scare quotes for a reason: it's actually the number of completely sent payloads. πŸ’€
  • Udpcli:received() β€” returns the number of "packets" received, which is actually the number of successful calls to recvfrom(2) that returned data. same scare quotes, same energy. πŸ™ˆ
  • Udpcli:errors() β€” returns the number of errors that happened while sending or receiving. hope it stays at zero fr fr 🀞

πŸ‘‘ AUTHORS and CONTRIBUTORS πŸ‘‘

Jerry LundstrΓΆm (DNS-OARC), TomΓ‘Ε‘ KΕ™Γ­ΕΎek (CZ.NIC), Petr Ε paček (ISC)

Maintained by DNS-OARC

https://www.dns-oarc.net/

πŸ’€ BUGS πŸ’€

got issues? got feature requests? bestie, they want to hear it:

https://codeberg.org/DNS-OARC/dnsjit/issues

got questions? need help? slide into the inbox:

admin@dns-oarc.net
no cap, those are the actual places to go. don't just suffer in silence πŸ’–

and that's the whole page, periodt. πŸ’… this was dnsjit version 1.5.1, and the page itself is dnsjit.output.udpcli(3) β€” go forth and send some payloads, you absolute icon. πŸŽ€βœ¨πŸ¦‹πŸŒΈ