21#ifndef G_NET_MONITOR_H
22#define G_NET_MONITOR_H
73 void report( std::ostream & stream ,
74 const std::string & line_prefix = {} ,
75 const std::string & eol = std::string(
"\n") )
const ;
97 static Monitor * & pthis() noexcept ;
98 std::unique_ptr<MonitorImp> m_imp ;
An abstract interface which provides information about a network connection.
An interface for a network listener.
A singleton for monitoring GNet::Client and GNet::ServerPeer connections.
static void addServer(const Listener &server)
Adds a server.
static void removeClient(const Connection &client) noexcept
Removes a client connection.
static void addServerPeer(const Connection &server_peer)
Adds a server connection.
static void removeServer(const Listener &server) noexcept
Removes a server.
G::Slot::Signal< const std::string &, const std::string & > & signal()
Provides a callback signal which can be connect()ed to a slot.
void report(std::ostream &stream, const std::string &line_prefix={}, const std::string &eol=std::string("\n")) const
Reports itself onto a stream.
Monitor()
Default constructor.
static Monitor * instance()
Returns the singleton pointer. Returns nullptr if none.
static void removeServerPeer(const Connection &server_peer) noexcept
Removes a server connection.
static void addClient(const Connection &client)
Adds a client connection.
std::vector< std::string > StringArray
A std::vector of std::strings.