SDK
SDK C++ v1.x
1

You are currently looking at the documentation of a previous version of Kuzzle. We strongly recommend that you use the latest version. You can also use the version selector in the top menu.

This SDK has been deprecated because of stability issues. It is not advised to use it in a production environment.

Kuzzle class getters #

autoQueue #

Returns a boolean telling if queries are automatically queued during offline mode.

Arguments #

Copied to clipboard!
bool autoQueue() const noexcept;

autoReconnect #

Returns a boolean telling if it will automatically reconnect after a connection loss.

Arguments #

Copied to clipboard!
bool autoReconnect() const noexcept;

autoReplay #

Returns a boolean telling if it automatically replays queued requests on a reconnected event.

Arguments #

Copied to clipboard!
bool autoReplay() const noexcept;

autoResubscribe #

Returns a boolean telling if it automatically renews all subscriptions on a reconnected event.

Arguments #

Copied to clipboard!
bool autoResubscribe() const noexcept;

getProtocol #

Returns the protocol instance used internally to communicate with the Kuzzle server.

Arguments #

Copied to clipboard!
Protocol* getProtocol();

jwt #

Returns the JWT currently used to authenticate requests.

Arguments #

Copied to clipboard!
const std::string jwt() const noexcept;

queueMaxSize #

Returns the number of maximum requests kept during offline mode.

Arguments #

Copied to clipboard!
int queueMaxSize() const noexcept;

queueTTL #

Returns the time a queued request is kept during offline mode, in milliseconds.

Arguments #

Copied to clipboard!
int queueTTL() const noexcept;

replayInterval #

Returns the delay between each replayed requests.

Arguments #

Copied to clipboard!
int replayInterval() const noexcept;

reconnectionDelay #

Returns the time between each reconnection attempt, in milliseconds.

Arguments #

Copied to clipboard!
int reconnectionDelay() const noexcept;

volatiles #

Returns the JSON string representing volatile data sent with each request.

Arguments #

Copied to clipboard!
const std::string& volatiles() const noexcept;

Usage #

Copied to clipboard!
kuzzleio::WebSocket *ws = new kuzzleio::WebSocket("kuzzle");
kuzzleio::Kuzzle *kuzzle = new kuzzleio::Kuzzle(ws);
std::string jwt_token = kuzzle->jwt();
kuzzleio::Protocol *protocol = kuzzle->getProtocol();
int max_size = kuzzle->queueMaxSize();
int queue_ttl = kuzzle->queueTTL();
int replay_interval = kuzzle->replayInterval();
int reconnection_delay = kuzzle->reconnectionDelay();
std::string volatile_data = kuzzle->volatiles();
bool auto_queue = kuzzle->autoQueue();
bool auto_reconnect = kuzzle->autoReconnect();
bool auto_replay = kuzzle->autoReplay();
bool auto_resubscribe = kuzzle->autoResubscribe();