eve.net.dtls.timer

EVE timer adapter for ddn-net-tls DTLS retransmission.

Wraps EVE's EventLoop.registerTimer / EventLoop.unregister into the ddn-net-tls DtlsTimerSink interface. Each call to scheduleTimeout cancels any previously scheduled timer before registering a new one-shot timer on the event loop.

The EVE timer callback signature requires @safe nothrow, but the DTLS timer sink accepts arbitrary delegates. This adapter stores the user callback and dispatches it from an @trusted wrapper that meets EVE's callback requirements.

Types 1

EVE-backed DTLS timer sink.

Schedules DTLS retransmission timeouts on an EVE event loop. Only one timeout may be active at a time; scheduling a new one cancels the previous.

Fields
private EventLoop * loop_
private Token token_
private void delegate() pending_
Methods
void scheduleTimeout(Duration delay, void delegate() onTimeout) @trustedSchedules a timeout callback on the EVE event loop.
void cancelTimeout() @trustedCancels any previously scheduled timeout.
Constructors
this(EventLoop * loop)Constructs an EVE DTLS timer bound to the given event loop.