Qore DebugHandler Module Reference  0.1
 All Classes Namespaces Functions Variables Groups Pages
DebugHandler::WebSocketDebugConnection Class Reference

this class represents a connection to a debug server via websocket client More...

Inheritance diagram for DebugHandler::WebSocketDebugConnection:

Public Member Functions

 connectionClosed ()
 this method is called by the WebSocketHandler when the connection is closed More...
 
 constructor (WebSocketDebugHandler n_handler, hash n_cx)
 the constructor is called by the WebSocketHandler when a new connection is made by a websocket client; it is called from WebSocketHandler::getConnectionImpl(), which can be overridden in subclasses to allow a subclass of this class to be used as the connection object
 
 gotMessage (string msg)
 this method is called by the WebSocketHandler when message from the client is received
 
 registered ()
 send welcome message to identify itself
 

Private Attributes

hash cx
 websocket context, cx.id is used for sending messages to particular client
 

Detailed Description

this class represents a connection to a debug server via websocket client

Receiving Debug commands from Clients
The class implements WebSocketConnection::gotMessage() to handle incomming commands passed as YAML objects to control assigned ProgramControl instance Such a command is handled on request/response basis.

Unsolicited messages are sent to client asynchronously when an event occurs in the program being debugged.

Member Function Documentation

DebugHandler::WebSocketDebugConnection::connectionClosed ( )

this method is called by the WebSocketHandler when the connection is closed

the implementation in this class is empty; implement this method in a subclass to provide custom behavior