SocketStreamBase

A stream that wraps a socket with buffered writes.

Constructors

this
this(T args)

Forwards argument to UnbufferedSocketStreamBase

Destructor

~this
~this()

Upon destruction, any pending writes are flushed to the socket.

Postblit

this(this)
this(this)
Undocumented in source.

Alias This

_stream

Members

Functions

flush
void flush()

Writes any pending data to the socket.

read
size_t read(ubyte[] buf)

Reads data from the socket. The stream itself doesn't buffer reading because the OS already buffers when receiving on a streaming socket.

write
size_t write(ubyte[] buf)

Write data to the stream, but buffer input so that only sufficiently large packets are sent.

Properties

bufferSize
size_t bufferSize [@property setter]

Sets the size of the buffer. The default is 8192 bytes. If there is currently data in the buffer, it will be flushed.

bufferSize
size_t bufferSize [@property getter]

Get the current buffer size. The default is 8192 bytes (8KB).

Meta