@gibme/ssdp
    Preparing search index...

    Class Browser

    A SSDP browser will look for and emit an event for the service types that it has been subscribed to. The full message payload is provided in the emitted events.

    Hierarchy

    • EventEmitter
      • Browser
    Index

    Constructors

    • Constructs a new instance of the browser

      Parameters

      • interval: number
      • socket: SSDP

      Returns Browser

    Properties

    _searchTargets: Set<string> = ...

    Accessors

    • get subscriptions(): string[]

      The browser's currently active search targets

      Returns string[]

    Methods

    • Destroys the browser

      Returns void

    • Emitted whenever we receive either a reply to our search/query or notification that a service that we have subscribed to is available

      Parameters

      • event: "discover"
      • listener: (
            service: string,
            payload: Notification | Reply,
            remote: RemoteInfo,
            local: AddressInfo,
        ) => void

      Returns this

    • Emitted whenever we receive a ssdp:bybye message for a service that we have subscribed to

      Parameters

      • event: "withdraw"
      • listener: (
            service: string,
            payload: Notification | Reply,
            remote: RemoteInfo,
            local: AddressInfo,
        ) => void

      Returns this

    • Emitted whenever we encounter an error

      Parameters

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

      Returns this

    • Emitted whenever we receive either a reply to our search/query or notification that a service that we have subscribed to is available

      Parameters

      • event: "discover"
      • listener: (
            service: string,
            payload: Notification | Reply,
            remote: RemoteInfo,
            local: AddressInfo,
        ) => void

      Returns this

    • Emitted whenever we receive a ssdp:bybye message for a service that we have subscribed to

      Parameters

      • event: "withdraw"
      • listener: (
            service: string,
            payload: Notification | Reply,
            remote: RemoteInfo,
            local: AddressInfo,
        ) => void

      Returns this

    • Emitted whenever we encounter an error

      Parameters

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

      Returns this

    • Emitted whenever we receive either a reply to our search/query or notification that a service that we have subscribed to is available

      Parameters

      • event: "discover"
      • listener: (
            service: string,
            payload: Notification | Reply,
            remote: RemoteInfo,
            local: AddressInfo,
        ) => void

      Returns this

    • Emitted whenever we receive a ssdp:bybye message for a service that we have subscribed to

      Parameters

      • event: "withdraw"
      • listener: (
            service: string,
            payload: Notification | Reply,
            remote: RemoteInfo,
            local: AddressInfo,
        ) => void

      Returns this

    • Emitted whenever we encounter an error

      Parameters

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

      Returns this

    • Triggers sending out search messages immediately

      Returns void

    • Adds the specified search target to the browser

      Parameters

      • service: string

      Returns void

    • Removes the specified search target from the browser

      Parameters

      • service: string

      Returns boolean