E-MailRelay

Public Member Functions | List of all members
GSmtp::ServerPeer Class Reference

Handles a connection from a remote SMTP client. More...

`#include <gsmtpserver.h>`

Inheritance diagram for GSmtp::ServerPeer:

## Public Member Functions
| ServerPeer (GNet::ExceptionSinkUnbound, const GNet::ServerPeerInfo &peer_info, Server &server, const GAuth::SaslServerSecrets &server_secrets, const Server::Config &server_config, std::unique_ptr< ServerProtocol::Text > ptext)
| Constructor. More...
| ServerPeer (const ServerPeer &)=delete
| ServerPeer (ServerPeer &&)=delete
void | operator= (const ServerPeer &)=delete
void | operator= (ServerPeer &&)=delete
Public Member Functions inherited from GNet::ServerPeer
| ServerPeer (ExceptionSink, const ServerPeerInfo &, const LineBufferConfig &)
| Constructor. More...
| ~ServerPeer () override
| Destructor. More...
bool | send (const std::string &data, std::size_t offset=0U)
| Sends data down the socket to the peer. More...
bool | send (const std::vector< G::string_view > &data)
| Overload to send data using scatter-gather segments. More...
std::pair< bool, Address > | localAddress () const override
| Returns the local address. More...
std::pair< bool, Address > | peerAddress () const override
| Returns the peer address. More...
std::string | connectionState () const override
| Returns the connection state display string. More...
std::string | peerCertificate () const override
| Returns the peer's TLS certificate. More...
void | doOnDelete (const std::string &reason, bool done)
| Used by the Server class to call onDelete(). More...
LineBufferState | lineBuffer () const
| Returns information about the state of the internal line-buffer. More...
| ServerPeer (const ServerPeer &)=delete
| ServerPeer (ServerPeer &&)=delete
void | operator= (const ServerPeer &)=delete
void | operator= (ServerPeer &&)=delete
Public Member Functions inherited from GNet::Connection
virtual | ~Connection ()=default
| Destructor.
virtual std::pair< bool, Address > | localAddress () const =0
| Returns the connection's local address. More...
virtual std::pair< bool, Address > | peerAddress () const =0
| Returns the connection's peer address. More...
virtual std::string | connectionState () const =0
| Returns the connection state as a display string. More...
virtual std::string | peerCertificate () const =0
| Returns the peer's TLS certificate. More...
Public Member Functions inherited from GNet::ExceptionSource
virtual std::string | exceptionSourceId () const
| Returns an identifying string for logging purposes, or the empty string. More...
virtual | ~ExceptionSource ()
| Destructor. More...
| ExceptionSource (const ExceptionSource &)=delete
| ExceptionSource (ExceptionSource &&)=delete
void | operator= (const ExceptionSource &)=delete
void | operator= (ExceptionSource &&)=delete

## Additional Inherited Members
Protected Member Functions inherited from GNet::ServerPeer
virtual void | onSendComplete ()=0
| Called after flow-control has been released and all residual data sent.
virtual bool | onReceive (const char *data, std::size_t size, std::size_t eolsize, std::size_t linesize, char c0)=0
| Called on receipt of data. See GNet::LineBuffer.
virtual void | onDelete (const std::string &reason)=0
| Called just before the Server deletes this ServerPeer as the result of an exception (but not as a result of Server destruction). More...
void | secureAccept ()
| Waits for the peer to start a secure session. More...
StreamSocket & | socket ()
| Returns a reference to the client-server connection socket. More...
void | expect (std::size_t)
| Modifies the line buffer state so that it delivers a chunk of non-line-delimited data. More...
void | onData (const char *, std::size_t) override
| Override from GNet::SocketProtocolSink. More...

## Detailed Description

Handles a connection from a remote SMTP client.

See also
  GSmtp::Server

Definition at line 149 of file gsmtpserver.h.

## Constructor & Destructor Documentation

## ◆ ServerPeer()

GSmtp::ServerPeer::ServerPeer | ( | GNet::ExceptionSinkUnbound | esu,
|  | const GNet::ServerPeerInfo & | peer_info,
|  | Server & | server,
|  | const GAuth::SaslServerSecrets & | server_secrets,
|  | const Server::Config & | server_config,
|  | std::unique_ptr< ServerProtocol::Text > | ptext
| ) |  |

Constructor.

Definition at line 77 of file gsmtpserver.cpp.

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

- /usr/src/slapt-src-x86_64/network/emailrelay/emailrelay-2.3/src/gsmtp/gsmtpserver.h
- /usr/src/slapt-src-x86_64/network/emailrelay/emailrelay-2.3/src/gsmtp/gsmtpserver.cpp