X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Socket%2FFileHandle.cc;h=bc8ea9caf21923dd77cdb2897f91116240ca2fe6;hb=a1fdb7bb122f0b05be809a922d4b7ef5e125fa67;hp=2b1e176989dc3d6d16d9e266e4e7348811e8a805;hpb=034f9bec0a66d26314fb6ebc83dedf1618a2c19d;p=senf.git diff --git a/Socket/FileHandle.cc b/Socket/FileHandle.cc index 2b1e176..bc8ea9c 100644 --- a/Socket/FileHandle.cc +++ b/Socket/FileHandle.cc @@ -111,16 +111,16 @@ prefix_ void senf::FileBody::blocking(bool status) /* We don't take POLLIN/POLLOUT as argument to avoid having to include sys/poll.h in the .cci file (and therefore indirectly into the .hh and then every file which uses FileHandle) */ -prefix_ bool senf::FileBody::pollCheck(int fd, bool incoming, bool block) +prefix_ bool senf::FileBody::pollCheck(int fd, bool incoming, int timeout, bool oob) const { struct ::pollfd pfd; ::memset(&pfd,0,sizeof(pfd)); pfd.fd = fd; - pfd.events = incoming?POLLIN:POLLOUT; + pfd.events = incoming?(oob?POLLPRI:POLLIN):POLLOUT; int rv = -1; do { - rv = ::poll(&pfd,1,block?-1:0); + rv = ::poll(&pfd,1,timeout); if (rv<0) switch (errno) { case EINTR: @@ -132,6 +132,9 @@ prefix_ bool senf::FileBody::pollCheck(int fd, bool incoming, bool block) return rv>0; } +prefix_ senf::FileBody::~FileBody() +{} + ///////////////////////////////cc.e//////////////////////////////////////// #undef prefix_