@gibme/ssdp
    Preparing search index...

    Class Advertiser

    A SSDP service advertiser that sends out service notifications based upon the specified interval. The system will also reply automatically to M-SEARCH queries for any services that we are an advertiser for. In addition, upnp::rootdevice, uuid:<uuid> and ssdp::all messages are responded to automatically as necessary.

    Hierarchy

    • EventEmitter
      • Advertiser
    Index

    Constructors

    • Protected

      Creates a new instance of an SSDP advertiser

      Parameters

      • interval: number
      • uuid: string
      • socket: SSDP
      • authenticationProvider: (ipAddress: string) => boolean | Promise<boolean>

      Returns Advertiser

    Properties

    _services: Map<string, Headers> = ...
    uuid: string

    Accessors

    • get services(): [string, Headers][]

      The advertiser's currently active services

      Returns [string, Headers][]

    Methods

    • Adds the service to the advertiser

      Parameters

      • service: string
      • headers: HeadersInit

      Returns void

    • Immediately sends NOTIFY messages for all services

      Returns void

    • Destroys the instance

      Returns void

    • Emitted when we receive an M-SEARCH message that we will handle

      Parameters

      • event: "search"
      • listener: (
            target: string,
            payload: Search,
            remote: RemoteInfo,
            local: AddressInfo,
        ) => void

      Returns this

    • Emitted when we encounter an error

      Parameters

      • event: "error"
      • listener: (error: Error) => void

      Returns this

    • Emitted when we receive an M-SEARCH message that we will handle

      Parameters

      • event: "search"
      • listener: (
            target: string,
            payload: Search,
            remote: RemoteInfo,
            local: AddressInfo,
        ) => void

      Returns this

    • Emitted when we encounter an error

      Parameters

      • event: "error"
      • listener: (error: Error) => void

      Returns this

    • Emitted when we receive an M-SEARCH message that we will handle

      Parameters

      • event: "search"
      • listener: (
            target: string,
            payload: Search,
            remote: RemoteInfo,
            local: AddressInfo,
        ) => void

      Returns this

    • Emitted when we encounter an error

      Parameters

      • event: "error"
      • listener: (error: Error) => void

      Returns this

    • Withdraws the service from the advertiser

      Parameters

      • service: string

      Returns boolean