eve.net.dtls.transport

EVE UDP transport adapter for ddn-net-tls DTLS.

Wraps an EVE UdpSocket into the ddn-net-tls DtlsTransport interface. Incoming datagrams from EVE's onRecvfrom callback are buffered internally and dequeued through recvFrom().

Outgoing datagrams are sent immediately via UdpSocket.sendToAddress.

Address conversion between EVE SocketAddress and DDN DatagramEndpoint is handled transparently.

Types 2

private structQueuedDatagram
Fields
ubyte[] data

EVE-backed DTLS transport.

Adapts an EVE UdpSocket to the DtlsTransport interface used by ddn-net-tls for DTLS record I/O. Datagrams received via EVE's onRecvfrom callback must be fed into this transport using feedDatagram.

Fields
private UdpSocket sock_
private QueuedDatagram[] inbox_
Methods
void feedDatagram(scope const(ubyte)[] data, ref const SocketAddress sender) @safeFeeds a received datagram into the internal inbox.
ptrdiff_t recvFrom(ubyte[] buffer, out DatagramEndpoint sender) @safeReceives a buffered datagram.
ptrdiff_t sendTo(const(ubyte)[] data, DatagramEndpoint dest) @trustedSends a datagram to the given address.
PollHandle pollHandle() @property const @safe pure nothrow @nogcReturns: An invalid poll handle (EVE manages I/O registration).
bool isOpen() @property const @safe nothrow @nogcReturns: true if the underlying socket is bound.
void close() @trustedCloses the underlying EVE UDP socket.
Constructors
this(ref UdpSocket sock)Constructs an EVE DTLS transport wrapping the given UDP socket.