25#ifndef JOIN_SERVICES_SMTP_PROTOCOL_HPP
26#define JOIN_SERVICES_SMTP_PROTOCOL_HPP
33 template <
class Protocol>
36 template <
class Protocol>
66 static Smtp smtpv4 (AF_INET);
76 static Smtp smtpv6 (AF_INET6);
84 constexpr int family () const noexcept
86 return _transport.
family ();
105 return a.family () == b.family ();
146 static Smtps smtpsv4 (AF_INET);
156 static Smtps smtpsv6 (AF_INET6);
166 return _transport.
family ();
185 return a.family () == b.family ();
basic SMTP client.
Definition smtp_protocol.hpp:34
Basic SMTPS client.
Definition smtp_protocol.hpp:37
TLS stream class.
Definition tls_stream.hpp:43
TLS decorator for stream sockets.
Definition tls_wrapper.hpp:38
SMTP protocol class (SMTP over TCP, upgradable to TLS using STARTTLS).
Definition smtp_protocol.hpp:43
typename Transport::Endpoint Endpoint
Definition smtp_protocol.hpp:46
static Smtp & v4() noexcept
get protocol suitable for IPv4 address family.
Definition smtp_protocol.hpp:64
static Smtp & v6() noexcept
get protocol suitable for IPv6 address family.
Definition smtp_protocol.hpp:74
static constexpr uint16_t defaultPort
default SMTP port.
Definition smtp_protocol.hpp:90
constexpr int family() const noexcept
get the protocol IP address family.
Definition smtp_protocol.hpp:84
constexpr Smtp(int family=AF_INET) noexcept
construct the SMTP protocol instance.
Definition smtp_protocol.hpp:55
SMTPS protocol class (SMTP over TLS).
Definition smtp_protocol.hpp:123
static constexpr uint16_t defaultPort
default SMTPS port.
Definition smtp_protocol.hpp:170
typename Transport::Endpoint Endpoint
Definition smtp_protocol.hpp:126
constexpr Smtps(int family=AF_INET) noexcept
construct the SMTPS protocol instance.
Definition smtp_protocol.hpp:135
constexpr int family() const noexcept
get the protocol IP address family.
Definition smtp_protocol.hpp:164
static Smtps & v6() noexcept
get protocol suitable for IPv6 address family.
Definition smtp_protocol.hpp:154
static Smtps & v4() noexcept
get protocol suitable for IPv4 address family.
Definition smtp_protocol.hpp:144
TCP protocol class.
Definition protocol.hpp:471
constexpr int family() const noexcept
get the protocol IP address family.
Definition protocol.hpp:513
BasicInternetEndpoint< Tcp > Endpoint
Definition protocol.hpp:473
Definition acceptor.hpp:32
bool operator==(const BasicLinkLayerEndpoint< Protocol > &a, const BasicLinkLayerEndpoint< Protocol > &b) noexcept
compare if endpoints are equal.
Definition endpoint.hpp:186
bool operator!=(const BasicLinkLayerEndpoint< Protocol > &a, const BasicLinkLayerEndpoint< Protocol > &b) noexcept
compare if endpoints are not equal.
Definition endpoint.hpp:198