PosixFileReader

A file reader implementation using the POSIX select API using events. Reads as much content as possible when new data is available at once, making the file reading operation much more efficient when large chunks of data are being transmitted.

Ideally would want to implement Epoll and Kqueue implementations of this reader instead, to support much longer timeouts with proper stop methods.

Constructors

this
this(File stdFile)
Undocumented in source.

Members

Functions

isReading
bool isReading()
Undocumented in source. Be warned that the author may not have intended to support it.
run
void run()
Undocumented in source. Be warned that the author may not have intended to support it.
stop
void stop()
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

closeEvent
Event closeEvent;
Undocumented in source.
stdFile
File stdFile;
Undocumented in source.
wantStop
bool wantStop;
Undocumented in source.

Inherited Members

From FileReader

yieldLine
string yieldLine(bool* whileThisIs, bool equalToThis)
Undocumented in source. Be warned that the author may not have intended to support it.
yieldData
ubyte[] yieldData(size_t length, bool* whileThisIs, bool equalToThis)

Yields until the specified length of data is available, then removes the data from the incoming data stream atomically and returns a duplicate of it. Returns null if the file reader stops while reading.

stop
void stop()
Undocumented in source.
isReading
bool isReading()
Undocumented in source.
run
void run()
Undocumented in source.
data
ubyte[] data;
Undocumented in source.
mutex
Mutex mutex;
Undocumented in source.

Meta