UnbufferedSocketStreamBase.read

Reads data from the socket.

struct UnbufferedSocketStreamBase
@safe
size_t
read
(
scope ubyte[] buf
)

Parameters

buf ubyte[]

The buffer to read the data into. The length of the buffer specifies how much data should be read.

Return Value

Type: size_t

The number of bytes that were read. If the socket is blocking wait for data to be available. If the remote side has closed the connection 0 is returned.

Throws

SocketException on failure.

Meta