MCPcopy Create free account
hub / github.com/cvut/qtrvsim / readBytePoll

Method readBytePoll

src/cli/chariohandler.cpp:43–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41}
42
43void CharIOHandler::readBytePoll(int fd, unsigned int &data, bool &available) {
44 char ch;
45 qint64 res;
46 if (!fd_specific || fd_list.contains(fd)) {
47 if (bytesAvailable() > 0) {
48 res = read(&ch, 1);
49 if (res > 0) {
50 data = ch & 0xff;
51 available = true;
52 }
53 }
54 }
55}
56
57void CharIOHandler::insertFd(const int &fd) {
58 fd_list.insert(fd);

Callers

nothing calls this directly

Calls 1

containsMethod · 0.45

Tested by

no test coverage detected