eve.net.tls.transport
EVE TCP transport adapter for ddn-net-tls.
Wraps an EVE TcpConnection into the ddn-net-tls TlsTransport interface. Incoming data from EVE's onData callback is buffered internally and presented through the synchronous read() method.
Typical usage:
auto conn = TcpConnection.create();
auto transport = new EveTlsTransport(conn);
auto stream = ctx.clientStream(transport, hostname);
conn.onData = (ref TcpConnection c, scope const(ubyte)[] data) {
transport.feed(data);
driveHandshake(loop, c, transport, stream, onDone);
};class EveTlsTransport
Types 1
classEveTlsTransport : TlsTransport
EVE-backed TLS transport.
Adapts an EVE TcpConnection to the TlsTransport interface used by ddn-net-tls for TLS record I/O. Data received via EVE's onData callback must be fed into this transport using feed.
Methods
void feed(scope const(ubyte)[] data)Feeds received data into the internal read buffer.ptrdiff_t read(ubyte[] buffer)Reads buffered data into the provided buffer.ptrdiff_t write(const(ubyte)[] data)Writes data to the underlying EVE TCP connection.void flush()Flushes the write buffer. No-op for EVE (writes are immediate).void close()Closes the underlying EVE TCP connection.PollHandle pollHandle() @property constReturns: An invalid poll handle (EVE manages I/O registration).private
void compact()Constructors
this(ref TcpConnection conn)Constructs an EVE TLS transport wrapping the given TCP connection.