Class: WebSocketDataConnector

OSH.DataConnector.WebSocketDataConnector

Defines the AjaxConnector to connect to a remote server by making AjaxRequest.

Constructor

new WebSocketDataConnector()

Source:

Extends

Methods

close()

Closes the webSocket.

Source:

connect()

Connect to the webSocket. If the system supports WebWorker, it will automatically creates one otherwise use
the main thread.

Source:

disconnect()

Disconnects the websocket.

Source:

getId() → {string}

The data connector default id.

Inherited From:
Source:
Returns:
Type
string

getUrl() → {string}

The stream url.

Inherited From:
Source:
Returns:
Type
string

onMessage(data)

The onMessage method used by the websocket to callback the data

Parameters:
Name Type Description
data

the callback data

Source: