Constructor
new UBNotifierWSProtocol(connection)
Arguments:
-
connection(UBConnection) Warning - only one instance of UBNotifierWSProtocol for a connection is valid.
- Mixes In:
Members
supported: boolean
Indicate ubNotifier protocol is supported by server.
If not supported all calls to send() will be ignored.
Methods
sendCommand(command, params)
Sand a command to server
- if WS connection is not accepted yet will buffer the commands and send it just after connection is accepted
- if
ubNotifier protocol not supported by server will do nothing
Arguments:
-
command (string)
-
params (*)
listenerCount(emitter, type) → Number
Return the number of listeners for a given event.
Arguments:
-
emitter (EventEmitter)
-
type (String)
- Mixes In:
ubNotifier protocol is supported by server.
If not supported all calls to send() will be ignored.
sendCommand(command, params)
Sand a command to server
- if WS connection is not accepted yet will buffer the commands and send it just after connection is accepted
- if
ubNotifierprotocol not supported by server will do nothing
Arguments:
-
command(string) -
params(*)
listenerCount(emitter, type) → Number
Return the number of listeners for a given event.
Arguments:
-
emitter(EventEmitter) -
type(String)
- Mixes In: