From: Christian P. <cp...@us...> - 2005-07-03 23:42:41
|
Update of /cvsroot/pclasses/pclasses2/src/Net In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14473/src/Net Modified Files: Socket.cpp Log Message: - Added virtual IODevice::setBlocking(), IODevice::isBlocking(), IODevice::wait() Index: Socket.cpp =================================================================== RCS file: /cvsroot/pclasses/pclasses2/src/Net/Socket.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- Socket.cpp 6 Jun 2005 12:09:31 -0000 1.10 +++ Socket.cpp 3 Jul 2005 23:42:33 -0000 1.11 @@ -484,6 +484,16 @@ P_SOURCEINFO); } +bool Socket::isBlocking() const throw() +{ + int ret; + ret = ::fcntl(handle(), F_GETFL); + if(ret == -1 || !(ret & O_NONBLOCK)) + return true; + + return false; +} + int Socket::handle() const throw() { return _handle; |