|
| WebSocketIO () |
|
| ~WebSocketIO () override |
|
int | isListening () |
|
virtual int | processEvent (const std::string &eventName, const std::string &eventData="") |
|
int | startServer (int PortNumber) |
|
int | stopServer () |
|
int | getPortNumber () |
|
int | sendString (const std::string &msg) const |
|
int | sendBinary (const size_t &sizeInBytes, const void *data) const |
|
int | sendMessage (const Message &msg) const |
|
int | queueMessage (const std::string &msg) |
|
int | queueMessage (const size_t &sizeInBytes, const void *data) |
|
int | queueMessage (const Message &msg) |
|
int | sendNextQueuedMessage () |
|
int | processMessageQueue () |
|
int | clearMessageQueue () |
|
| Debug () |
|
| ~Debug () override |
|
virtual int | setDebugLevel (const int &debugLevel) |
|
int | setWrapper (const Wrapper *wrapper) override |
|
int | printMsg (const std::string &msg, const debug::Priority &priority=debug::Priority::INFO, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cout) const |
|
int | printMsg (const std::vector< std::string > &msgs, const debug::Priority &priority=debug::Priority::INFO, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cout) const |
|
int | printErr (const std::string &msg, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cerr) const |
|
int | printWrn (const std::string &msg, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cerr) const |
|
int | printMsg (const std::string &msg, const double &progress, const double &time, const int &threads, const double &memory, const debug::LineMode &lineMode=debug::LineMode::NEW, const debug::Priority &priority=debug::Priority::PERFORMANCE, std::ostream &stream=std::cout) const |
|
int | printMsg (const std::string &msg, const double &progress, const double &time, const debug::LineMode &lineMode=debug::LineMode::NEW, const debug::Priority &priority=debug::Priority::PERFORMANCE, std::ostream &stream=std::cout) const |
|
int | printMsg (const std::string &msg, const double &progress, const double &time, const int &threads, const debug::LineMode &lineMode=debug::LineMode::NEW, const debug::Priority &priority=debug::Priority::PERFORMANCE, std::ostream &stream=std::cout) const |
|
int | printMsg (const std::string &msg, const double &progress, const debug::LineMode &lineMode=debug::LineMode::NEW, const debug::Priority &priority=debug::Priority::PERFORMANCE, std::ostream &stream=std::cout) const |
|
int | printMsg (const std::string &msg, const double &progress, const debug::Priority &priority, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cout) const |
|
int | printMsg (const std::vector< std::vector< std::string > > &rows, const debug::Priority &priority=debug::Priority::INFO, const bool hasHeader=true, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cout) const |
|
int | printMsg (const debug::Separator &separator, const debug::LineMode &lineMode=debug::LineMode::NEW, const debug::Priority &priority=debug::Priority::INFO, std::ostream &stream=std::cout) const |
|
int | printMsg (const debug::Separator &separator, const debug::Priority &priority, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cout) const |
|
int | printMsg (const std::string &msg, const debug::Separator &separator, const debug::LineMode &lineMode=debug::LineMode::NEW, const debug::Priority &priority=debug::Priority::INFO, std::ostream &stream=std::cout) const |
|
void | setDebugMsgPrefix (const std::string &prefix) |
|
| BaseClass () |
|
virtual | ~BaseClass ()=default |
|
int | getThreadNumber () const |
|
virtual int | setThreadNumber (const int threadNumber) |
|
- Author
- Jonas Lukasczyk jl@jl.nosp@m.uk.d.nosp@m.e
- Date
- 13.04.2021
This module provides functions for bi-directional communication between two websockets, where the heavy lifting is done by the websocketpp library. The primary use case for this module is to send data that was computed in a c++ environment to a browser client, which can then freely process/render the data via JavaScript and HTML. To this end, this module needs to run a websocket server, to which a client can connect to via the ttkWebSocketIO.js library. The server can also receive data from the client, which is then fed into the processEvent function. In order to add custom processing of events, one needs to inherit from the WebSocketIO class and override the processEvent method. The vtk wrapper ttkWebSocketIO provides an example on how this abstract base module can be specialized to the application of sending/receiving vtkDataObjects. Specifically, the ttkWebSocketIO filter will send its input vtkDataObject as a serialized JSON object to all connected clients every time the filter is called with a new input. When the server receives a serialized JSON object form the client, then the filter will instantiate a vtkDataObject and pass it as the filter output.
Definition at line 51 of file WebSocketIO.h.