21#ifndef G_NET_MONITOR_H
22#define G_NET_MONITOR_H
72 void report( std::ostream & stream ,
73 const std::string & line_prefix = std::string() ,
74 const std::string & eol = std::string(
"\n") )
const ;
92 void operator=(
const Monitor & ) = delete ;
93 void operator=(
Monitor && ) = delete ;
96 static Monitor * & pthis() noexcept ;
97 std::unique_ptr<MonitorImp> m_imp ;
An abstract interface which provides address information for 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=std::string(), 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.