TBufferedTransport

Wraps another transport and buffers reads and writes until the internal buffers are exhausted, at which point new data is fetched resp. the accumulated data is written out at once.

Constructors

this
this(TTransport transport)

Constructs a new instance, using the default buffer sizes.

this
this(TTransport transport, size_t bufferSize)

Constructs a new instance, using the specified buffer size.

this
this(TTransport transport, size_t readBufferSize, size_t writeBufferSize)

Constructs a new instance, using the specified buffer size.

Members

Functions

borrow
const(ubyte)[] borrow(ubyte* buf, size_t len)
Undocumented in source. Be warned that the author may not have intended to support it.
close
void close()
Undocumented in source. Be warned that the author may not have intended to support it.
consume
void consume(size_t len)
Undocumented in source. Be warned that the author may not have intended to support it.
flush
void flush()
Undocumented in source. Be warned that the author may not have intended to support it.
isOpen
bool isOpen()
Undocumented in source. Be warned that the author may not have intended to support it.
open
void open()
Undocumented in source. Be warned that the author may not have intended to support it.
peek
bool peek()
Undocumented in source. Be warned that the author may not have intended to support it.
read
size_t read(ubyte[] buf)
Undocumented in source. Be warned that the author may not have intended to support it.
readAll
void readAll(ubyte[] buf)

Shortcut version of readAll.

underlyingTransport
TTransport underlyingTransport()

The wrapped transport.

write
void write(ubyte[] buf)
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

DEFAULT_BUFFER_SIZE
enum int DEFAULT_BUFFER_SIZE;

The default size of the read/write buffers, in bytes.

Inherited Members

From TBaseTransport

isOpen
bool isOpen()
Undocumented in source. Be warned that the author may not have intended to support it.
peek
bool peek()
Undocumented in source. Be warned that the author may not have intended to support it.
open
void open()
Undocumented in source. Be warned that the author may not have intended to support it.
close
void close()
Undocumented in source. Be warned that the author may not have intended to support it.
read
size_t read(ubyte[] buf)
Undocumented in source. Be warned that the author may not have intended to support it.
readAll
void readAll(ubyte[] buf)
Undocumented in source. Be warned that the author may not have intended to support it.
readEnd
size_t readEnd()
Undocumented in source. Be warned that the author may not have intended to support it.
write
void write(ubyte[] buf)
Undocumented in source. Be warned that the author may not have intended to support it.
writeEnd
size_t writeEnd()
Undocumented in source. Be warned that the author may not have intended to support it.
flush
void flush()
Undocumented in source. Be warned that the author may not have intended to support it.
borrow
const(ubyte)[] borrow(ubyte* buf, size_t len)
Undocumented in source. Be warned that the author may not have intended to support it.
consume
void consume(size_t len)
Undocumented in source. Be warned that the author may not have intended to support it.

Meta