Class IntraEmailReceiver
Defined in File intra_receiver.hpp
Inheritance Relationships
Base Type
public email::EmailReceiver
(Class EmailReceiver)
Class Documentation
-
class IntraEmailReceiver : public email::EmailReceiver
Intraprocess email receiver.
Receives email objects from the intraprocess email sender. Uses a simple queue to act as a buffer in between.
Public Functions
-
IntraEmailReceiver()
Constructor.
-
virtual ~IntraEmailReceiver()
-
virtual std::optional<struct EmailData> get_email(std::optional<std::chrono::nanoseconds> polling_period = std::nullopt)
Get a new email.
This function fetches a new email through polling.
The caller can specify a polling period, which will be used as a target polling rate. This means that, if the internal polling call takes more time than the polling period, the next call will be executed right away.
If the polling period value is equal to 0, the sleep call will be skipped, and polling will be done as fast as possible. This is the default value.
- Parameters:
polling_period – the polling period
- Returns:
the new email, or
std::nullopt
if it failed
-
IntraEmailReceiver()