def doRead(self):
        """Called when my socket is ready for reading."""
        read = 0
        while read < self.maxThroughput:
            try:
                data = os.read(self.fd, self.maxPacketSize)
                read += len(data)
#                pkt = TuntapPacketInfo(data)
                self.protocol.datagramReceived(data,
                                               partial=0 # pkt.isPartial(),
                                               )
            except OSError, e:
                if e.errno in (errno.EWOULDBLOCK,):
                    return
                else:
                    raise
            except __HOLE__, e:
                if e.errno in (errno.EAGAIN, errno.EINTR):
                    return
                else:
                    raise
            except:
                log.deferr()
dataset/ETHPy150Open kuri65536/python-for-android/python-modules/twisted/twisted/pair/tuntap.py/TuntapPort.doRead