E-MailRelay
|
A GNet::Server class used in GNet::MultiServer. More...
#include <gmultiserver.h>
Public Member Functions | |
MultiServerImp (MultiServer &, ExceptionSink, const Address &, ServerPeerConfig, ServerConfig) | |
Constructor. More... | |
~MultiServerImp () override | |
Destructor. | |
std::unique_ptr< ServerPeer > | newPeer (ExceptionSinkUnbound, ServerPeerInfo) final |
Called by the base class to create a new ServerPeer. More... | |
void | cleanup () |
Calls GNet::Server::serverCleanup(). More... | |
MultiServerImp (const MultiServerImp &)=delete | |
MultiServerImp (MultiServerImp &&)=delete | |
void | operator= (const MultiServerImp &)=delete |
void | operator= (MultiServerImp &&)=delete |
![]() | |
Server (ExceptionSink, const Address &listening_address, ServerPeerConfig, ServerConfig) | |
Constructor. More... | |
~Server () override | |
Destructor. More... | |
Address | address () const override |
Returns the listening address. More... | |
std::vector< std::weak_ptr< GNet::ServerPeer > > | peers () |
Returns the list of ServerPeer objects. More... | |
bool | hasPeers () const |
Returns true if peers() is not empty. More... | |
Server (const Server &)=delete | |
Server (Server &&)=delete | |
void | operator= (const Server &)=delete |
void | operator= (Server &&)=delete |
![]() | |
virtual | ~Listener ()=default |
Destructor. | |
virtual Address | address () const =0 |
Returns the listening address. More... | |
Additional Inherited Members | |
![]() | |
static bool | canBind (const Address &listening_address, bool do_throw) |
Checks that the specified address can be bound. More... | |
![]() | |
virtual std::unique_ptr< ServerPeer > | newPeer (ExceptionSinkUnbound, ServerPeerInfo)=0 |
A factory method which new()s a ServerPeer-derived object. More... | |
void | serverCleanup () |
Should be called by the most-derived class's destructor in order to trigger early deletion of peer objects before the derived part of the server disappears. More... | |
A GNet::Server class used in GNet::MultiServer.
Definition at line 134 of file gmultiserver.h.
GNet::MultiServerImp::MultiServerImp | ( | MultiServer & | ms, |
ExceptionSink | es, | ||
const Address & | address, | ||
ServerPeerConfig | server_peer_config, | ||
ServerConfig | server_config | ||
) |
Constructor.
Definition at line 251 of file gmultiserver.cpp.
void GNet::MultiServerImp::cleanup | ( | ) |
Calls GNet::Server::serverCleanup().
Definition at line 262 of file gmultiserver.cpp.
|
finalvirtual |
Called by the base class to create a new ServerPeer.
Implements GNet::Server.
Definition at line 267 of file gmultiserver.cpp.