EMILUA(3em)
πΈ NAME πΈ
okay bestie, welcome to EMILUA(3em) β this is the manual page for Emilua, and yes, it's literally the Lua execution engine β¨
β¨ SYNOPSIS β¨
no cap, here's the exact shape of the thing β keep it in a code block so nothing gets lost:
local ip = require "ip"
ip.tcp.get_address_info()
ip.tcp.get_address_v4_info()
ip.tcp.get_address_v6_info()
ip.udp.get_address_info()
ip.udp.get_address_v4_info()
ip.udp.get_address_v6_info()
function(host: string|ip.address, service: string|integer[, flags: string[]])
-> { address: ip.address, port: integer, canonical_name: string|nil }[]
π¦ DESCRIPTION π¦
okay so this function forward-resolves host and service into a list of endpoint entries. the current fiber gets suspended until the operation finishes β like, it's literally waiting for the glow-up to complete π
π Note: if noflagsare passed (i.e.flagsisnil), then this function follows the glibc defaults even on non-glibc systems:bit.bor(address_configured,v4_mapped). that's the vibe check, and it's exact.
It returns a list of entries. every entry is a table with these members:
address:ip.address.port:integer.
If "canonical_name" is passed in flags, then each entry also includes:
canonical_name:string.
More info on Boost.Asio documentation is right here: https://www.boost.org/doc/libs/1_70_0/doc/html/boost_asio/reference/ip__basic_resolver/async_resolve/overload3.html.
If host is an ip.address, then no host name resolution should be attempted. same energy for service: if service is a number, then no service name resolution should be attempted. periodt.
π© FLAGS π©
each one of these is literally the flag with the same name in Boost.Asio, so no invented lore bestie.
π address_configured π
this is the address_configured flag from Boost.Asio, same name, docs here: https://www.boost.org/doc/libs/1_70_0/doc/html/boost_asio/reference/ip__resolver_base/address_configured.html.
what it does: it only returns IPv4 addresses if a non-loopback IPv4 address is configured for the system. and it only returns IPv6 addresses if a non-loopback IPv6 address is configured for the system. that's the whole rule π
π all_matching π
this is the all_matching flag from Boost.Asio, same name, docs here: https://www.boost.org/doc/libs/1_70_0/doc/html/boost_asio/reference/ip__resolver_base/all_matching.html.
what it does: if you use it with v4_mapped, it returns all matching IPv6 and IPv4 addresses. yes bestie, all of them.
π¦ canonical_name π¦
this is the canonical_name flag from Boost.Asio, same name, docs here: https://www.boost.org/doc/libs/1_70_0/doc/html/boost_asio/reference/ip__resolver_base/canonical_name.html.
what it does: it determines the canonical name of the host specified in the query. iconic, honestly.
π§ passive π§
this is the passive flag from Boost.Asio, same name, docs here: https://www.boost.org/doc/libs/1_70_0/doc/html/boost_asio/reference/ip__resolver_base/passive.html.
what it does: it indicates that the returned endpoint is intended for use as a locally bound socket endpoint. locally bound, main character energy.
π v4_mapped π
this is the v4_mapped flag from Boost.Asio, same name, docs here: https://www.boost.org/doc/libs/1_70_0/doc/html/boost_asio/reference/ip__resolver_base/v4_mapped.html.
what it does: if the query protocol family is specified as IPv6, it returns IPv4-mapped IPv6 addresses when it finds no IPv6 addresses. no IPv6? boom, v4-mapped ones show up.
π okay that's the whole page, bestie β from Emilua 0.12.1-nixpkgs1, dated 1980-01-01, and it's EMILUA(3em) forever. slay, bye π«Ά
π¦ where this page comes from
- nixos 26.05: emilua 0.12.1
- nixpkgs unstable: emilua 0.12.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms