|
E-MailRelay
|
Handles a connection from a remote SMTP client. More...
#include <gsmtpserver.h>
Inheritance diagram for GSmtp::ServerPeer:
Collaboration diagram for GSmtp::ServerPeer:Public Member Functions | |
| ServerPeer (GNet::EventStateUnbound, GNet::ServerPeerInfo &&peer_info, Server &server, bool enabled, VerifierFactoryBase &vf, const GAuth::SaslServerSecrets &server_secrets, const Server::Config &server_config, std::unique_ptr< ServerProtocol::Text > ptext) | |
| Constructor. More... | |
| ~ServerPeer () override | |
| Destructor. More... | |
| ServerPeer (const ServerPeer &)=delete | |
| ServerPeer (ServerPeer &&)=delete | |
| ServerPeer & | operator= (const ServerPeer &)=delete |
| ServerPeer & | operator= (ServerPeer &&)=delete |
Public Member Functions inherited from GNet::ServerPeer | |
| ServerPeer (EventState, ServerPeerInfo &&, const LineBuffer::Config &) | |
| Constructor. More... | |
| ~ServerPeer () override | |
| Destructor. More... | |
| bool | send (const std::string &data) |
| Sends data down the socket to the peer. More... | |
| bool | send (std::string_view data) |
| Overload for string_view. More... | |
| bool | send (const std::vector< std::string_view > &data, std::size_t offset=0U) |
| Overload to send data using scatter-gather segments. More... | |
| Address | localAddress () const override |
| Returns the local address. More... | |
| 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... | |
| LineBufferState | lineBuffer () const |
| Returns information about the state of the internal line-buffer. More... | |
| void | setIdleTimeout (unsigned int seconds) |
| Sets the idle timeout. More... | |
| void | doOnDelete (const std::string &reason, bool done) |
| Used by the GNet::Server class to call onDelete(). More... | |
| ServerPeer (const ServerPeer &)=delete | |
| ServerPeer (ServerPeer &&)=delete | |
| ServerPeer & | operator= (const ServerPeer &)=delete |
| ServerPeer & | operator= (ServerPeer &&)=delete |
| bool | send (const char *, std::size_t offset)=delete |
| bool | send (const char *)=delete |
| bool | send (const std::string &, std::size_t offset)=delete |
Public Member Functions inherited from GNet::Connection | |
| virtual | ~Connection ()=default |
| Destructor. | |
| virtual Address | localAddress () const =0 |
| Returns the connection's local address. More... | |
| virtual 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 | ~ExceptionSource () |
| Destructor. | |
| ExceptionSource (const ExceptionSource &)=delete | |
| ExceptionSource (ExceptionSource &&)=delete | |
| ExceptionSource & | operator= (const ExceptionSource &)=delete |
| ExceptionSource & | operator= (ExceptionSource &&)=delete |
Additional Inherited Members | |
Static Public Member Functions inherited from GNet::ServerPeer | |
| static std::string | eventLoggingString (const Address &, const Config &) |
| Assembles an event logging string for a new ServerPeer object. More... | |
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 a complete line of data. More... | |
| 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... | |
| bool | secureAcceptCapable () const |
| Returns true if secureAccept() is usable. More... | |
| StreamSocket & | socket () |
| Returns a reference to the client-server connection socket. More... | |
| void | dropReadHandler () |
| Drops the socket() read handler. More... | |
| void | addReadHandler () |
| Re-adds the socket() read handler. More... | |
| void | expect (std::size_t) |
| Modifies the line buffer state so that it delivers a chunk of non-line-delimited data. More... | |
| void | finish () |
| Does a socket shutdown(). See also GNet::Client::finish(). More... | |
| void | onData (const char *, std::size_t) override |
| Override from GNet::SocketProtocolSink. More... | |
Handles a connection from a remote SMTP client.
Definition at line 175 of file gsmtpserver.h.
| GSmtp::ServerPeer::ServerPeer | ( | GNet::EventStateUnbound | esu, |
| GNet::ServerPeerInfo && | peer_info, | ||
| Server & | server, | ||
| bool | enabled, | ||
| VerifierFactoryBase & | vf, | ||
| const GAuth::SaslServerSecrets & | server_secrets, | ||
| const Server::Config & | server_config, | ||
| std::unique_ptr< ServerProtocol::Text > | ptext | ||
| ) |
Constructor.
Definition at line 36 of file gsmtpserver.cpp.
|
override |
Destructor.
Definition at line 66 of file gsmtpserver.cpp.