FiberSelectReader.transmit

Reads data from the input conduit and appends them to the data buffer.

class FiberSelectReader
protected override
bool
transmit
(
Event events
)
out (received) { assert (received <= data.length, "received length too high"); }

Parameters

events Event

events reported for the input device

Return Value

Type: bool

true if data were received or false to retry later.

Throws

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

Note: POSIX says the following about the return value of read():

When attempting to read from an empty pipe or FIFO [remark: includes sockets]:

- If no process has the pipe open for writing, read() shall return 0 to indicate end-of-file.

- If some process has the pipe open for writing and O_NONBLOCK is set, read() shall return -1 and set errno to EAGAIN.

- If some process has the pipe open for writing and O_NONBLOCK is clear, read() shall block the calling thread until some data is written or the pipe is closed by all processes that had the pipe open for writing.

@see http://pubs.opengroup.org/onlinepubs/009604499/functions/read.html

Meta