Transport

Interface representing a bidirectional transport.

There may be several implementations, but typically, the user does not implement new transports; rather, the platform provides some useful transports that are implemented using the platform's best practices.

The user never instantiates a transport directly; they call a utility function, passing it a protocol factory and other information necessary to create the transport and protocol. (E.g. $(D_PSYMBOL EventLoop.createConnection()) or $(D_PSYMBOL EventLoop.createServer()).)

The utility function will asynchronously create a transport and a protocol and hook them up by calling the protocol's $(D_PSYMBOL connectionMade()) method, passing it the transport.

interface Transport : ReadTransport , WriteTransport {}

Inherited Members

From ReadTransport

pauseReading
void pauseReading()

Pause the receiving end.

resumeReading
void resumeReading()

Resume the receiving end.

From WriteTransport

abort
void abort()

Close the transport immediately, without waiting for pending operations to complete.

canWriteEof
bool canWriteEof()
getWriteBufferSize
size_t getWriteBufferSize()
getWriteBufferLimits
BufferLimits getWriteBufferLimits()

Get the high- and low-water limits for write flow control.

setWriteBufferLimits
void setWriteBufferLimits(Nullable!size_t high = Nullable!size_t(), Nullable!size_t low = Nullable!size_t())

Set the high- and low-water limits for write flow control.

write
void write(const(void)[] data)

Write some data bytes to the transport.

writeEof
void writeEof()

Close the write end of the transport after flushing buffered data.

Meta