hammerspoon2-docs
    Preparing search index...

    Function advertise

    • Starts advertising a local service on the network. If domain is omitted or not a string, it defaults to "local.". If the 4th argument is a function, it is used as the callback and domain defaults to "local.".

      Parameters

      • name: string

        human-readable name shown to browsers (e.g. "My Web Server")

      • type: string

        service type in "_proto._tcp." or "_proto._udp." form

      • port: number

        port number the service listens on

      • domain: string

        mDNS domain; defaults to "local." if an empty string is passed

      • Optionalcallback: ((event: string, error?: string) => void) | null

        Optional function called on status changes with event name and optional error message

      Returns void