'Called when my socket is ready for reading.'

def doRead(self):

    read = 0
    while (read < self.maxThroughput):
        try:
            data = self._system.read(self._fileno, self.maxPacketSize)
        except EnvironmentError as e:
            if (e.errno in (errno.EWOULDBLOCK, errno.EAGAIN, errno.EINTR)):
                return
            else:
                raise
        except:
            raise
        read += len(data)
        try:
            self.protocol.datagramReceived(data, partial=0)
        except:
            cls = fullyQualifiedName(self.protocol.__class__)
            log.err(None, ('Unhandled    exception    from    %s.datagramReceived' % (cls,)))
