TTransport.read

Attempts to fill the given buffer by reading data.

For potentially blocking data sources (e.g. sockets), read() will only block if no data is available at all. If there is some data available, but waiting for new data to arrive would be required to fill the whole buffer, the readily available data will be immediately returned – use readAll() if you want to wait until the whole buffer is filled.

interface TTransport
size_t
read
(
ubyte[] buf
)

Parameters

buf ubyte[]

Slice to use as buffer.

Return Value

Type: size_t

How many bytes were actually read

Throws

TTransportException if an error occurs.

Meta