int NetInterface::readWithTimeout ( const int  BUFFER_SIZE,
int  timeoutMillis 
)

Definition at line 102 of file NetInterface.cpp.

00103 {
00104         pollfd myPollfd;
00105         myPollfd.fd = outDescr;
00106         myPollfd.events = POLLIN;
00107         int pollResult = poll(&myPollfd, 1, timeoutMillis);
00108         if (pollResult > 0) {
00109                 return read(BUFFER_SIZE);
00110         }
00111         else {
00112                 return NetInterface::NO_DATA_UNTIL_TIMEOUT;
00113         }
00114 }


Generated on Wed Jun 25 14:47:11 2008 for keyvil by  doxygen 1.5.1