E-MailRelay
Public Member Functions | Static Public Member Functions | List of all members
GNet::Monitor Class Reference

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.
 

Detailed Description

A singleton for monitoring GNet::SimpleClient and GNet::ServerPeer connections and for storing their TLS certificates.

See also
GNet::SimpleClient, GNet::ServerPeer

Definition at line 41 of file gmonitor.h.

Member Function Documentation

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 148 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 signal emits events with two string parameters: the first is "in" or "out", and the second is "start" or "stop".

Definition at line 118 of file gmonitor.cpp.


The documentation for this class was generated from the following files: