Qore SewioWebSocketClient Module Reference  1.1

Introduction to the SewioWebSocketClient Module

The SewioWebSocketClient module provides client support for RFC-6455 based WebSocket protocol implementations in Qore for Sewio.net's RTLS Studio servers.

To use this module, use "%requires SewioWebSocketClient" in your code.

This module automatically uses the WebSocketClient module for encoding and decoding web socket messages.

All the public symbols in the module are defined in the SewioWebSocketClient namespace.

Currently the module provides the following classes:

Example

#!/usr/bin/env qore
%new-style
%enable-all-warnings
%requires SewioWebSocketClient
*string url = shift ARGV;
*string apikey = shift ARGV;
if (!url || !apikey) {
stderr.printf("usage: %s <URL> <APIKEY>\n", get_script_name());
exit(1);
}
SewioWebSocketClient ws();
ws.connect(("url": url, "callback": sub (*data d) {if (d) printf("%s\n", d);}));
# wait forever (or until ctrl-c)
Counter c(1);
c.waitForZero();

SewioWebSocketClient Module Release History

v1.1

  • all connection clases have unified constructor

v1.1