The Web Socket API is described in
Include/Cohtml/Socket.h and consists of the classes
To integrate WebSockets with your Gameface interface, you must first have a WebSocket library implemented with your engine. In order to create WebSocket your ViewListener must implement properly
Gameface supports sending and receiving string or binary data over WebSocket.
WebSocket.send(data) JS API is implemented for strings and binary types (
Blobobjects over WebSocket.
To use binary messages, the
cohtml::websocket::OpCode should be used properly according to the
On the JS side, the binaryType property can be used to control the type of received binary data.
WebSocketHub.cpp – an example implementation of the web socket API can be found in the
Modules/WebSockets directory of your distribution package.