54 namespace WebSocketHandler {
71 const DefaultQueuePollingInterval = 50ms;
215 private sendClose(
Qore::Socket sock,
int code, *
string txtmsg);
218 static string getDataString(*data data);
*binary pollData()
this method is called by the WebSocketHandler to poll for messages from the client to send from the s...
*AbstractAuthenticator auth
logDebug(string fmt)
default implementation is empty
this class represents a connection to a websocket client
Definition: WebSocketHandler.qm.dox.h:65
*binary pollDataImmediate()
this method is called by the WebSocketHandler to poll for messages from the client to send from the s...
hash handleRequest(hash cx, hash hdr, *data b)
called by the HTTP server to handle incoming HTTP requests
deregisterConnectionImpl(WebSocketConnection wsc)
called when the connection terminates; the default implementation does nothing
WebSocketConnection getConnectionImpl(hash cx, hash hdr, string cid)
called when a connection is established; the default implementation creates a WebSocketConnection obj...
startImpl(softstring lid, hash cx, hash hdr, Qore::Socket sock)
called from the HTTP server after the handleRequest() method indicates that a dedicated connection sh...
sendAll(data d)
sends a message to all connected clients
the main web socket handler class
Definition: WebSocketHandler.qm.dox.h:125
logError(string fmt)
default implementation is empty
constructor(WebSocketHandler handler)
the constructor is called by the WebSocketHandler when a new connection is made by a websocket client...
send(data msg)
pushes an unencoded message on the connection's message queue; the message will be encoded with WebSo...
RWLock rwl()
connection read-write lock
hash ch
connection hash
Definition: WebSocketHandler.qm.dox.h:137
gotMessage(string msg)
this method is called by the WebSocketHandler when messages from the client are received ...
constructor(*HttpServer::AbstractAuthenticator auth)
create the object optionally with the given AbstractAuthenticator
sendOne(string id, data d)
sends a message to the given connection ID
Qore::Thread::Queue queue()
the Queue object stored messages to be sent to the server
logInfo(string fmt)
default implementation is empty
sendEncoded(binary msg)
pushes an already-encoded message on the connection's message queue