16#include <sys/select.h>
22using namespace ::
Binc;
44 return ioctl(fileno(stdin), FIONREAD, (
char *) &bytes) > 0;
52 FD_SET(fileno(stdout), &writeMask);
58 int result = select(fileno(stdout) + 1, 0, &writeMask, 0,
timeout ? &tv : 0);
68 FD_SET(fileno(stdin), &readMask);
74 int result = select(fileno(stdin) + 1, &readMask, 0, 0,
timeout ? &tv : 0);
108 ssize_t red = read(fileno(stdin), buf,
sizeof(buf) - 1);
const std::string & str(void) const
std::string popString(unsigned int size)
unsigned int getSize(void) const
The IODevice class provides a framework for reading and writing to device.
bool waitForRead(void) const
bool waitForWrite(void) const
std::string service(void) const
bool fillInputBuffer(void)
Declaration of the StdIODevice class.