Class: Protocol

Protocol(address, port)

SSDP protocol implementation

Constructor

new Protocol(address, port)

Parameters:
Name Type Description
address string SSDP multicast address
port integer SSDP multicast port
Properties:
Name Type Description
signature string Default SERVER and USER-AGENT header field values.
Source:

Classes

Protocol

Members

multicastAddress

Multicast socket IPv4 address
Source:

multicastAddress

Set multicast socket IPv4 address
Source:

multicastPort

Multicast socket port
Source:

multicastPort

Set multicast socket port
Source:

started

Indicates if the protocol is started
Source:

Methods

createNotification(arguments) → {Notification}

Create a new Notification to be used with this protocol
Parameters:
Name Type Description
arguments Array Notification constructor arguments.
Source:
Returns:
- A notification with pre-assigned header fields describing the protocol instance.
Type
Notification

createSearchRequest(arguments) → {SearchRequest}

Create a new search request
Parameters:
Name Type Description
arguments Array SearchRequest constructor arguments.
Source:
Returns:
Search request with pre-defined header field describing the protocol instance.
Type
SearchRequest

notify(notification, persist)

Send NOTIFY message
Parameters:
Name Type Description
notification Notification Notification to send
persist boolean If true, the notification will be re-send automatically according notification interval value
Source:
Send a M-SEARCH request
Parameters:
Name Type Description
what SearchRequest | string Search request or simply subject of the search
Source:

start()

Start listening SSDP message and emit pending messages.
Source:

(async) stop()

Stop listening SSDP message and notify control points that registered service are no more available
Source: