@gibme/ssdp
    Preparing search index...

    Class Search

    Represents an M-SEARCH payload

    Hierarchy

    • Payload
      • Search
    Index

    Constructors

    • Constructs a new instance of the object

      Parameters

      • host: string
      • port: number

      Returns Search

    Properties

    host: string
    isReply: boolean = false
    method: "reply" | "m-search" | "notify"
    port: number

    Accessors

    • get headers(): Headers
      Protected

      Returns the headers contained in the payload

      Returns Headers

    • set headers(value: Headers): void
      Protected

      Sets the headers contained in the payload

      Parameters

      • value: Headers

      Returns void

    • get isAlive(): boolean

      Returns whether this is a ssdp:alive message

      Returns boolean

    • get isByeBye(): boolean

      Returns whether this is a ssdp::byebye message

      Returns boolean

    • get isUpdate(): boolean

      Returns whether this is as ssdp:update message

      Returns boolean

    Methods

    • Clears all the headers

      Returns void

    • Deletes the specified header

      Parameters

      • key: string

      Returns void

    • Attempts to retrieve the specified header

      Parameters

      • key: string

      Returns undefined | string

    • Returns whether the specified header exists

      Parameters

      • key: string

      Returns boolean

    • Sets the specified header to the specified value

      Parameters

      • key: string
      • value: string | number

      Returns void

    • Returns a Buffer representation of the object

      Returns Buffer

    • Returns a string representation of the instance

      Returns string

    • Protected

      Decodes the headers from the specified payload

      Parameters

      • payload: string | Buffer<ArrayBufferLike>

      Returns Headers

    • Decodes a payload into an instance of the object

      Parameters

      • payload: string | Buffer<ArrayBufferLike>
      • host: string
      • port: number

      Returns Search