'Called when my socket is ready for reading.'

def doRead(self):

    read = 0
    while (read < self.maxThroughput):
        try:
            (data, addr) = self.socket.recvfrom(self.maxPacketSize)
            read += len(data)
            self.protocol.datagramReceived(data)
        except socket.error as se:
            no = se.args[0]
            if (no in (EAGAIN, EINTR, EWOULDBLOCK)):
                return
            if (no == ECONNREFUSED):
                self.protocol.connectionRefused()
            else:
                raise
        except:
            log.deferr()
