Classes | Public Member Functions | List of all members
GPop::Server Class Reference

A POP server class. More...

#include <gpopserver.h>

Inheritance diagram for GPop::Server:
GNet::MultiServer

Classes

struct  Config
 A structure containing GPop::Server configuration parameters. More...
 

Public Member Functions

 Server (Store &store, const Secrets &, Config)
 Constructor. The 'secrets' reference is kept. More...
 
virtual ~Server ()
 Destructor. More...
 
GNet::ServerPeernewPeer (GNet::Server::PeerInfo)
 From MultiServer. More...
 
void report () const
 Generates helpful diagnostics after construction. More...
 
- Public Member Functions inherited from GNet::MultiServer
 MultiServer (const AddressList &address_list, bool use_connection_lookup)
 Constructor. More...
 
 MultiServer ()
 Default constructor. Initialise with init(). More...
 
void init (const AddressList &address_list)
 Initilisation after default construction. More...
 
virtual ~MultiServer ()
 Destructor. More...
 
std::pair< bool, AddressfirstAddress () const
 Returns the first listening address. More...
 

Additional Inherited Members

- Public Types inherited from GNet::MultiServer
typedef std::list< AddressAddressList
 
typedef Server::PeerInfo PeerInfo
 
- Static Public Member Functions inherited from GNet::MultiServer
static bool canBind (const AddressList &listening_address_list, bool do_throw)
 Checks that the specified addresses can be bound. More...
 
static AddressList addressList (const Address &)
 A trivial convenience fuction that returns the given addresses as a single-element list. More...
 
static AddressList addressList (const AddressList &, unsigned int port)
 Returns the given list of addresses with the port set correctly. More...
 
static AddressList addressList (const G::Strings &, unsigned int port)
 A convenience function that returns a list of listening addresses given a list of listening interfaces and a port number. More...
 
- Protected Member Functions inherited from GNet::MultiServer
void serverCleanup ()
 Should be called from all derived classes' destructors so that peer objects can use their Server objects safely during their own destruction. More...
 
void serverReport (const std::string &server_type) const
 Writes to the system log a summary of the underlying server objects and their addresses. More...
 

Detailed Description

A POP server class.

Definition at line 96 of file gpopserver.h.

Constructor & Destructor Documentation

GPop::Server::Server ( Store store,
const Secrets secrets,
Config  config 
)

Constructor. The 'secrets' reference is kept.

Definition at line 97 of file gpopserver.cpp.

GPop::Server::~Server ( )
virtual

Destructor.

Definition at line 105 of file gpopserver.cpp.

Member Function Documentation

GNet::ServerPeer * GPop::Server::newPeer ( GNet::Server::PeerInfo  peer_info)
virtual

From MultiServer.

Implements GNet::MultiServer.

Definition at line 117 of file gpopserver.cpp.

References G_WARNING, GNet::Local::isLocal(), and GNet::Server::PeerInfo::m_address.

void GPop::Server::report ( ) const

Generates helpful diagnostics after construction.

Definition at line 111 of file gpopserver.cpp.

References G_LOG_S.


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