gluamdns

package module
v0.0.0-...-0d6bed7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 20, 2025 License: MIT Imports: 4 Imported by: 0

README

gluamdns

This is a lua module for mdns service discovery.

Usage

local mdns = require("mdns")

-- Browse for services on the local network
-- Parameters:
--   1. service type (e.g. "_workstation._tcp")
--   2. domain (typically "local")
--   3. timeout in seconds
local results = mdns.browse("_workstation._tcp", "local", 2)

-- Results is a table of entries, each containing:
--   - name: service name
--   - service: service type
--   - domain: domain name
--   - port: port number
--   - ips: table of IP addresses
--   - serviceInstanceName: full service instance name
--   - serviceTypeName: full service type name

for _, entry in ipairs(results) do
    print("Found service:", entry.name)
    print("Port:", entry.port)
    print("IPs:", table.concat(entry.ips, ", "))
end

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Loader

func Loader(L *lua.LState) int

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL