Skip to content
FutureBlitz

    Install

    Import std.net.lan

    Lan

    std.net.lan

    struct

    Public Struct Lan

    Finds the services on the LAN.

    std/net/lan.fb, line 175

    • @PanicsAtCaller Public Static Method Find(type: String, timeout: Duration? = Null, discoveryPort: UInt16 = MDNS_PORT): LanService[] Throws NetError static method #

      The services of type, as LanAnnouncer.Start takes it, that answer within timeout, 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 NetError static method #

      Find's Async twin, which waits on the main thread.

    • Public Static Method LocalAddresses(): IpAddress[] static method #

      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.

    • Public Static Method HostName(): String static method #

      This machine's name, as its OS has it.

    Report an issue with this page or with FutureBlitz on GitHub.