TaskSelectTransceiver.readConsume

Calls consume with data read from the I/O device.

If consume feels that the amount of data passed to it is sufficient it should return the number of bytes it consumed, which is a value between 0 and data.length (inclusive). Otherwise, if consume consumed all data and still needs more data from the I/O device, it should return a value greater than data.length`; it will then called again after more data have been received.

class TaskSelectTransceiver
void
readConsume
(
scope size_t delegate
(
void[] data
)
consume
)

Parameters

consume size_t delegate
(
void[] data
)

consumer callback delegate

Throws

IOException if no data were received nor will any arrive later: - IOWarning on end-of-flow condition or if the remote hung up, - IOError (IOWarning subclass) on I/O error.

Meta