E-MailRelay

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

Implements the POP server-side protocol. More...

`#include <gpopserverprotocol.h>`

## Classes
struct | Config
| A structure containing configuration parameters for ServerProtocol, currently empty. More...
class | Security
| An interface used by ServerProtocol to enable TLS. More...
class | Sender
| An interface used by ServerProtocol to send protocol replies. More...
class | Text
| An interface used by ServerProtocol to provide response text strings. More...

## Public Member Functions
| ServerProtocol (Sender &sender, Security &security, Store &store, const GAuth::SaslServerSecrets &server_secrets, const std::string &sasl_server_config, const Text &text, const GNet::Address &peer_address, const Config &config)
| Constructor. More...
void | init ()
| Starts the protocol. More...
void | apply (const std::string &line)
| Called on receipt of a string from the client. More...
void | resume ()
| Called when the Sender can send again. More...
void | secure ()
| Called when the server connection becomes secure. More...
| ServerProtocol (const ServerProtocol &)=delete
| ServerProtocol (ServerProtocol &&)=delete
void | operator= (const ServerProtocol &)=delete
void | operator= (ServerProtocol &&)=delete

## Detailed Description

Implements the POP server-side protocol.

Uses the ServerProtocol::Sender as its "sideways" interface to talk back to the client.

See also
  RFC-1939

Definition at line 47 of file gpopserverprotocol.h.

## Constructor & Destructor Documentation

## ◆ ServerProtocol()

GPop::ServerProtocol::ServerProtocol | ( | Sender & | sender,
|  | Security & | security,
|  | Store & | store,
|  | const GAuth::SaslServerSecrets & | server_secrets,
|  | const std::string & | sasl_server_config,
|  | const Text & | text,
|  | const GNet::Address & | peer_address,
|  | const Config & | config
| ) |  |

Constructor.

The Sender interface is used to send protocol replies back to the client.

The Text interface is used to get informational text for returning to the client.

All references are kept.

Definition at line 32 of file gpopserverprotocol.cpp.

## Member Function Documentation

## ◆ apply()

void GPop::ServerProtocol::apply | ( | const std::string & | line | ) |

Called on receipt of a string from the client.

The string is expected to be CR-LF terminated. Throws ProtocolDone if done.

Definition at line 113 of file gpopserverprotocol.cpp.

## ◆ init()

void GPop::ServerProtocol::init | ( |  | ) |

Starts the protocol.

Definition at line 74 of file gpopserverprotocol.cpp.

## ◆ resume()

void GPop::ServerProtocol::resume | ( |  | ) |

Called when the Sender can send again.

The Sender returns false from protocolSend() when blocked, and calls resume() when unblocked.

Definition at line 161 of file gpopserverprotocol.cpp.

## ◆ secure()

void GPop::ServerProtocol::secure | ( |  | ) |

Called when the server connection becomes secure.

Definition at line 502 of file gpopserverprotocol.cpp.

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

- /usr/src/slapt-src-x86_64/network/emailrelay/emailrelay-2.3/src/gpop/gpopserverprotocol.h
- /usr/src/slapt-src-x86_64/network/emailrelay/emailrelay-2.3/src/gpop/gpopserverprotocol.cpp