DebugHandler.qm.dox.h
// -*- mode: c++; indent-tabs-mode: nil -*-
/* DebugHandler.qm Copyright 2013 - 2017 Qore Technologies, s.r.o.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
*/
// this module requires Qore 0.8.12 or better
// require type definitions everywhere
// enable all warnings
namespace DebugHandler {
class WebSocketDebugConnection : public WebSocketHandler::WebSocketConnection {
public:
public :
WebSocketDebugHandler dhandler;
public:
private :
hash cx;
public:
constructor(WebSocketDebugHandler n_handler, hash n_cx);
gotMessage(string msg);
connectionClosed();
registered();
};
class WebSocketDebugHandler : public WebSocketHandler::WebSocketHandler {
public:
public :
WebSocketDebugProgramControl debugProgram;
// default socket send timeout
//const DefaultSocketSendTimeout = 30s;
DebugLogger logger;
public:
constructor(*HttpServer::AbstractAuthenticator auth, WebSocketDebugProgramControl dpc, *list args) ;
setLogger(*list args);
WebSocketHandler::WebSocketConnection getConnectionImpl(hash cx, hash hdr, string cid);
hash handleRequest(hash cx, hash hdr, *data b);
logInfo(string fmt);
logDebug(string fmt);
logError(string fmt);
};
class WebSocketDebugProgramControl : public DebugProgramControl {
public:
private :
WebSocketDebugHandler handler;
public:
constructor(string serverName, *HttpServer::AbstractAuthenticator auth) ;
private:
setHandler(*HttpServer::AbstractAuthenticator auth, *list args);
public:
sendDataImpl(hash cx, auto data);
broadcastDataImpl(auto data);
WebSocketHandler getHandler();
*string getContentType();
};
};
DebugHandler::WebSocketDebugHandler
the main web socket debug handler class
Definition: DebugHandler.qm.dox.h:107
DebugHandler::WebSocketDebugConnection::registered
registered()
send welcome message to identify itself
WebSocketHandler::WebSocketConnection
list
list list(...)
HttpServer::AbstractAuthenticator
DebugHandler::WebSocketDebugConnection::gotMessage
gotMessage(string msg)
this method is called by the WebSocketHandler when message from the client is received ...
DebugHandler
the DebugHandler namespace contains all the objects in the DebugHandler module
Definition: DebugHandler.qm.dox.h:49
WebSocketHandler
DebugHandler::WebSocketDebugProgramControl
web socket debug program control class
Definition: DebugHandler.qm.dox.h:172
DebugHandler::WebSocketDebugConnection::connectionClosed
connectionClosed()
this method is called by the WebSocketHandler when the connection is closed
WebSocketHandler::WebSocketHandler
DebugHandler::WebSocketDebugConnection
this class represents a connection to a debug server via websocket client
Definition: DebugHandler.qm.dox.h:59
DebugProgramControl
hash
hash hash(object obj)
DebugHandler::WebSocketDebugConnection::constructor
constructor(WebSocketDebugHandler n_handler, hash n_cx)
the constructor is called by the WebSocketHandler when a new connection is made by a websocket client...
DebugHandler::WebSocketDebugConnection::cx
hash cx
websocket context, cx.id is used for sending messages to particular client
Definition: DebugHandler.qm.dox.h:69