This function is called when a message is received.
This function is called when a message is sent.
Wait for a binary message.
Optional
timeout: numberTimeout as unsigned 32-bit integer or Number.POSITIVE_INFINITY. If undefined use the default value passed to the constructor.
The promise will resolve when a value was received. The promise will reject when 1) the timeout expired 2) the connection was closed
Wait for an incoming message for a specified period of time.
Optional
timeout: numberTimeout as unsigned 32-bit integer or Number.POSITIVE_INFINITY. If undefined use the default value passed to the constructor.
The promise will resolve when a value was received. The value will be the JSON.parsed object. The promise will reject when 1) the timeout expired 2) the connection was closed
Wait for an incoming message with a specific type for a specified period of time.
The type field of the message should have this type.
The name of the member that holds the type that is checked for equality with the type param.
Optional
timeout: numberTimeout as unsigned 32-bit integer or Number.POSITIVE_INFINITY. If undefined use the default value passed to the constructor.
The promise will resolve when a value was received. The value will be the JSON.parse'd object The promise will reject when 1) the timeout expired 2) the connection was closed 3) the type of the received message doe not match parameter 'type'
Wait for an incoming message for a specified period of time.
Optional
timeout: numberTimeout as unsigned 32-bit integer or Number.POSITIVE_INFINITY. If undefined use the default value passed to the constructor.
The promise will resolve when a value was received. The promise will reject when 1) the timeout expired 2) the connection was closed
Wait for a string based message.
Optional
timeout: numberTimeout as unsigned 32-bit integer or Number.POSITIVE_INFINITY. If undefined use the default value passed to the constructor.
The promise will resolve when a value was received. The promise will reject when 1) the timeout expired 2) the connection was closed
This function is called when a plugin is attached.