Qore SewioWebSocketClient Module Reference  1.1
SewioWebSocketClient::SewioWebSocketConnection Class Reference

class for Sewio RTLS Studio websocket connections; returns an object of class SewioWebSocketClient for receiving websocket events from a Sewio RTLS Studio websocket server More...

Inheritance diagram for SewioWebSocketClient::SewioWebSocketConnection:

Public Member Methods

deprecated constructor (string name, string desc, string url, bool monitor, *hash opts, hash urlh)
 DEPRECATED: creates the SewioWebSocketConnection object. More...
 
 constructor (string name, string description, string url, hash attributes={}, hash options={})
 creates the SewioWebSocketConnection connection object More...
 
*hash getDefaultOptions ()
 returns default options
 
hash getOptions ()
 gets options
 
string getType ()
 returns "sewiowebsocket"
 

Static Public Member Methods

static deprecated SewioWebSocketConnection make (string name, string desc, string url, bool monitor, *hash opts, hash urlh)
 DEPRECATED: static constructor. More...
 

Private Member Methods

SewioWebSocketClient getImpl (bool connect=True, *hash rtopts)
 returns a SewioWebSocketClient object More...
 

Detailed Description

class for Sewio RTLS Studio websocket connections; returns an object of class SewioWebSocketClient for receiving websocket events from a Sewio RTLS Studio websocket server

supports the following options:

  • "apikey": (requried) the Sewio RTLS Studio API key to use for the connection
  • "connect_timeout": connection timeout to use in milliseconds
  • "http_version": HTTP version to use ("1.0" or "1.1", defaults to "1.1")
  • "max_redirects": maximum redirects to support
  • "proxy": proxy URL to use
  • "timeout": transfer timeout to use in milliseconds

also supports the following runtime options in getImpl() for connection logging:

  • "callback": (required) a callback to receive websocket events
  • "dbglog": a closure taking a single string for detailed technical connection logging
  • "errlog": a closure accepting a single string for error logging
  • "log": a closure accepting a single string for logging

Member Function Documentation

◆ constructor() [1/2]

deprecated SewioWebSocketClient::SewioWebSocketConnection::constructor ( string  name,
string  desc,
string  url,
bool  monitor,
*hash  opts,
hash  urlh 
)

DEPRECATED: creates the SewioWebSocketConnection object.

Parameters
namethe name of the connection
descconnection description
urlconnection URL
monitormonitoring flag
optsconnection options
urlhbroken down URL hash (as returned by Qore::parse_url())
Exceptions
SEWIOWEBSOCKETCONNECTION-ERRORmissing apikey option
Deprecated:
since Qore 0.9

◆ constructor() [2/2]

SewioWebSocketClient::SewioWebSocketConnection::constructor ( string  name,
string  description,
string  url,
hash  attributes = {},
hash  options = {} 
)

creates the SewioWebSocketConnection connection object

Parameters
namethe name of the connection
descriptionconnection description
urlconnection URL (potentially with password info)
attributesvarious attributes. See below
optionsconnection options

See AbstractConnection::constructor() for attributes and options reference.

Exceptions
SEWIOWEBSOCKETCONNECTION-ERRORmissing apikey option

◆ getImpl()

SewioWebSocketClient SewioWebSocketClient::SewioWebSocketConnection::getImpl ( bool  connect = True,
*hash  rtopts 
)
privatevirtual

returns a SewioWebSocketClient object

Parameters
connectif True, then WebSocketClient::connect() is called
rtoptssupports the following runtime options in getImpl() for connection logging:
  • "log": a closure accepting a single string for logging
  • "errlog": a closure accepting a single string for error logging
  • "dbglog": a closure taking a single string for detailed technical connection logging
Returns
a SewioWebSocketClient object

Reimplemented from WebSocketClient::WebSocketConnectionObject.

◆ make()

static deprecated SewioWebSocketConnection SewioWebSocketClient::SewioWebSocketConnection::make ( string  name,
string  desc,
string  url,
bool  monitor,
*hash  opts,
hash  urlh 
)
static

DEPRECATED: static constructor.

Deprecated:
since Qore 0.9 in favor of new constructor and Qore::Reflection