This section contains a description for the websocket methods. As for now this API is considered incomplete.
onOpen
The function, which will be executed, when the websocket is opend. The code block can be found below:
webSocket.onopen = function(message) {[FunctionLogic]};
onClose
The function, which will be executed, when the websocket is beign closed. The code block can be found below:
webSocket.onclose = function(message) {[FunctionLogic]};
onError
The function, which will be exceuted, when the websocket throws an error. The code block can be found below:
webSocket.onerror = function(message) {[FunctionLogic]};
onMessage
The function, which will be executed, when the websocket returns a message. The code block can be found below:
webSocket.onmessage = function(message) {[FunctionLogic]};
close
This function closes the websocket.
webSocket.close();
send
A specific request will be send to the websocket and interpreted by the other side of the connection. In this case a connector:
webSocket.send([request]);
[FunctionLogic]
This parameter contains the function, which will be executed.
[request]
This parameter is a JSON object send to the respective function. The requests for the Connector can be found here.