Constructor #
WebSocket is a class implementing the virtual class Protocol.
This is the main entry point to communicate with Websocket protocol. Pass an instance of this class to the constructor of the Kuzzle SDK to use this protocol to connect to the Kuzzle server.
Signature #
WebSocket(const std::string& host,);
WebSocket(const std::string& host, kuzzleio::options& options);
Arguments #
Argument | Type | Description |
---|---|---|
host | const std::string& | Kuzzle server hostname or IP |
options | kuzzleio::options* | WebSocket protocol configuration |
options #
Option | Type ( default ) | Description |
---|---|---|
port | int ( 7512 ) | Kuzzle server port |
ssl | bool ( false ) | Use SSL to connect to Kuzzle server |
Usage #
kuzzleio::WebSocket* ws = new kuzzleio::WebSocket("kuzzle");
Edit this page on Github(opens new window)