VideoTools
|
A singleton for monitoring GNet::SimpleClient and GNet::ServerPeer connections and for storing their TLS certificates. More...
#include <gmonitor.h>
Public Member Functions | |
Monitor () | |
Default constructor. | |
virtual | ~Monitor () |
Destructor. | |
void | addClient (const Connection &simple_client) |
Adds a client connection. | |
void | removeClient (const Connection &simple_client) |
Removes a client connection. | |
void | addServerPeer (const Connection &server_peer) |
Adds a server connection. | |
void | removeServerPeer (const Connection &server_peer) |
Removes a server connection. | |
void | report (std::ostream &stream, const std::string &line_prefix=std::string(), const std::string &eol=std::string("\n")) const |
Reports itself onto a stream. | |
void | report (G::StringArray &out) const |
Reports itself into a three-column table. | |
std::pair< std::string, bool > | findCertificate (const std::string &certificate) |
Returns a short id for the given certificate and a boolean flag to indicate if it is a new certificate id that has not been returned before. More... | |
G::Slot::Signal2< std::string, std::string > & | signal () |
Provides a callback signal which can be connect()ed to a slot. More... | |
Static Public Member Functions | |
static Monitor * | instance () |
Returns the singleton pointer. Returns null if none. | |
A singleton for monitoring GNet::SimpleClient and GNet::ServerPeer connections and for storing their TLS certificates.
Definition at line 42 of file gmonitor.h.
std::pair< std::string, bool > GNet::Monitor::findCertificate | ( | const std::string & | certificate | ) |
Returns a short id for the given certificate and a boolean flag to indicate if it is a new certificate id that has not been returned before.
Definition at line 149 of file gmonitor.cpp.
G::Slot::Signal2< std::string, std::string > & GNet::Monitor::signal | ( | ) |
Provides a callback signal which can be connect()ed to a slot.
the first is "in" or "out", and the second is "start" or "stop".
Definition at line 119 of file gmonitor.cpp.