![]() |
Qore WebSocketClient Module Reference
1.8
|
class for websocket connections; returns an object of class WebSocketClient for receiving websocket events from a websocket server More...

Public Member Functions | |
| deprecated | constructor (string name, string desc, string url, bool monitor, *hash opts, hash urlh) |
| DEPRECATED: creates the WebSocketConnectionObject object. More... | |
| constructor (string name, string description, string url, hash attributes={}, hash options={}) | |
| creates the WebSocketConnectionObject connection object More... | |
| *hash | getDefaultOptions () |
| returns default options | |
| hash | getOptions () |
| gets options | |
| *hash | getRuntimeOptions () |
| returns runtime options More... | |
| string | getType () |
returns "websocket" | |
Static Public Member Functions | |
| static deprecated WebSocketConnectionObject | make (string name, string desc, string url, bool monitor, *hash opts, hash urlh) |
| DEPRECATED: static constructor. More... | |
Protected Member Functions | |
| WebSocketClient | getImpl (bool connect=True, *hash rtopts) |
| returns a WebSocketClient object More... | |
class for websocket connections; returns an object of class WebSocketClient for receiving websocket events from a websocket server
supports the following options:
"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 millisecondsalso supports the following runtime options in getImpl():
"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"yield": a closure to yield current thread execution | deprecated WebSocketClient::WebSocketConnectionObject::constructor | ( | string | name, |
| string | desc, | ||
| string | url, | ||
| bool | monitor, | ||
| *hash | opts, | ||
| hash | urlh | ||
| ) |
DEPRECATED: creates the WebSocketConnectionObject object.
| name | the name of the connection |
| desc | connection description |
| url | connection URL |
| monitor | monitoring flag |
| opts | connection options |
| urlh | broken down URL hash (as returned by Qore::parse_url()) |
| WebSocketClient::WebSocketConnectionObject::constructor | ( | string | name, |
| string | description, | ||
| string | url, | ||
| hash | attributes = {}, |
||
| hash | options = {} |
||
| ) |
creates the WebSocketConnectionObject connection object
| name | the name of the connection |
| description | connection description |
| url | connection URL (potentially with password info) |
| attributes | various attributes. See below |
| options | connection options |
See AbstractConnection::constructor() for attributes and options reference.
|
protected |
returns a WebSocketClient object
| connect | if True, then WebSocketClient::connect() is called |
| rtopts | supports the following runtime options in getImpl():
|
| *hash WebSocketClient::WebSocketConnectionObject::getRuntimeOptions | ( | ) |
returns runtime options
"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"yield": a closure to yield current thread execution
|
static |
DEPRECATED: static constructor.