'Called when my socket is ready for reading.
This accepts a connection and calls self.protocol() to handle the
wire-level protocol.'

def doRead(self):

    try:
        if (platformType == 'posix'):
            numAccepts = self.numberAccepts
        else:
            numAccepts = 1
        for i in range(numAccepts):
            if self.disconnecting:
                return
            try:
                (skt, addr) = self.socket.accept()
            except socket.error as e:
                if (e.args[0] in (EWOULDBLOCK, EAGAIN)):
                    self.numberAccepts = i
                    break
                elif (e.args[0] == EPERM):
                    continue
                elif (e.args[0] in (EMFILE, ENOBUFS, ENFILE, ENOMEM, ECONNABORTED)):
                    log.msg(('Could    not    accept    new    connection    (%s)' % (errorcode[e.args[0]],)))
                    break
                raise
            fdesc._setCloseOnExec(skt.fileno())
            protocol = self.factory.buildProtocol(self._buildAddr(addr))
            if (protocol is None):
                skt.close()
                continue
            s = self.sessionno
            self.sessionno = (s + 1)
            transport = self.transport(skt, protocol, addr, self, s, self.reactor)
            protocol.makeConnection(transport)
        else:
            self.numberAccepts = (self.numberAccepts + 20)
    except:
        log.deferr()
