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

Copied to clipboard!
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

Copied to clipboard!
kuzzleio::WebSocket* ws = new kuzzleio::WebSocket("kuzzle");