Import std.net.lan
Lan
struct
Public Struct Lan
Finds the services on the LAN.
-
@PanicsAtCaller Public Static Method Find(type: String, timeout: Duration? = Null, discoveryPort: UInt16 = MDNS_PORT): LanService[] Throws NetErrorstatic method #The services of
type, as LanAnnouncer.Start takes it, that answer withintimeout, a second unless it's given, in the order they answered, each once. It asks again a third of the way through, as answers can be lost. Throws a NetError when it can't ask, as when the machine has no network. A type that isn't one panics. -
@PanicsAtCaller Public Static Async Method FindAsync(type: String, timeout: Duration? = Null, discoveryPort: UInt16 = MDNS_PORT): LanService[] Throws NetErrorstatic method #Find's Async twin, which waits on the main thread.
-
The addresses this machine has on its networks, but loopback's, IPv4's and IPv6's, as a LAN service shows where to reach it.
-
This machine's name, as its OS has it.
Report an issue with this page or with FutureBlitz on GitHub.