50 G_EXCEPTION( SendError ,
"network send error" ) ;
58 bool protocolSend(
const std::string & line , std::size_t )
override ;
59 void onDelete(
const std::string & )
override ;
60 bool onReceive(
const char * , std::size_t , std::size_t , std::size_t ,
char )
override ;
61 void onSecure(
const std::string & ,
const std::string & ,
const std::string & )
override ;
62 void onSendComplete()
override ;
63 bool securityEnabled()
const override ;
64 void securityStart()
override ;
70 void operator=(
const ServerPeer & ) = delete ;
74 void processLine(
const std::string & line ) ;
77 std::unique_ptr<ServerProtocol::Text> m_ptext ;
87 G_EXCEPTION( Overflow ,
"too many interface addresses" ) ;
90 bool allow_remote{
false} ;
91 unsigned int port{110} ;
95 std::string sasl_server_config ;
100 const std::string & sasl_server_config ) ;
101 Config & set_allow_remote(
bool =
true ) ;
102 Config & set_port(
unsigned int ) ;
106 Config & set_sasl_server_config(
const std::string & ) ;
124 void operator=(
const Server & ) = delete ;
125 void operator=(
Server && ) = delete ;
128 std::unique_ptr<ServerProtocol::Text> newProtocolText(
const GNet::Address & )
const ;
136inline GPop::Server::Config & GPop::Server::Config::set_allow_remote(
bool b ) { allow_remote = b ;
return *this ; }
137inline GPop::Server::Config & GPop::Server::Config::set_port(
unsigned int p ) { port = p ;
return *this ; }
141inline GPop::Server::Config & GPop::Server::Config::set_sasl_server_config(
const std::string & s ) { sasl_server_config = s ;
return *this ; }
An interface used by GAuth::SaslServer to obtain authentication secrets.
The GNet::Address class encapsulates a TCP/UDP transport address.
A potential ExceptionSink that is realised by bind()ing an exception source pointer.
A tuple containing an ExceptionHandler interface pointer and a bound 'exception source' pointer.
A server that listens on more than one address using a facade pattern to multiple GNet::Server instan...
A structure that GNet::Server uses to configure its ServerPeer objects.
A structure used in GNet::Server::newPeer().
An abstract base class for the GNet::Server's connection to a remote client.
Represents a connection from a POP client.
ServerPeer(GNet::ExceptionSinkUnbound, const GNet::ServerPeerInfo &, Store &, const GAuth::SaslServerSecrets &, const std::string &sasl_server_config, std::unique_ptr< ServerProtocol::Text > ptext, const ServerProtocol::Config &)
Constructor.
An interface used by ServerProtocol to enable TLS.
An interface used by ServerProtocol to send protocol replies.
Implements the POP server-side protocol.
Server(GNet::ExceptionSink, Store &store, const GAuth::SaslServerSecrets &, const Config &)
Constructor. The 'secrets' reference is kept.
~Server() override
Destructor.
void report() const
Generates helpful diagnostics after construction.
std::vector< std::string > StringArray
A std::vector of std::strings.
A structure used in GNet::MultiServer::newPeer().
A configuration structure for GNet::Server.
A structure containing configuration parameters for ServerProtocol, currently empty.
A structure containing GPop::Server configuration parameters.