74 namespace WebSocketClient {
108 timeout timeout_ms = DefaultTimeout;
113 const DefaultTimeout = 15s;
115 const Version =
"1.0";
117 const DefaultUserAgent =
sprintf(
"Qore-WebSocketClient/%s", WebSocketClient::Version);
190 eventLoop(code callback);
202 logError(
string fmt);
208 logDebug(
string fmt);
214 sendClose(
int code, *
string txtmsg);
220 hash connectUnlocked(*
hash hdr, *reference info);
string sprintf(string fmt,...)
const WsSchemes
known websocket schemes
Definition: WebSocketClient.qm.dox.h:77
bool isOpen()
returns True if the connection is currently open and active, False if not
const WsDefaultPort
default port for connections
Definition: WebSocketClient.qm.dox.h:87
the main websocket client class
Definition: WebSocketClient.qm.dox.h:96
constructor(code callback, hash opts)
creates the object and optionally sets logging targets
disconnect(int cmd=WSCC_GoingAway)
disconnect with the given close code
hash connect(*hash opts, *reference info)
connects to the websocket server