'Calls {IProtocol.dataReceived} with all available data and
L{IFileDescriptorReceiver.fileDescriptorReceived} once for each
received file descriptor in ancillary data.
This reads up to C{self.bufferSize} bytes of data from its socket, then
dispatches the data to protocol callbacks to be handled.  If the
connection is not lost through an error in the underlying recvmsg(),
this function will return the result of the dataReceived call.'

def doRead(self):

    try:
        (data, ancillary, flags) = untilConcludes(sendmsg.recvmsg, self.socket, self.bufferSize)
    except socket.error as se:
        if (se.args[0] == EWOULDBLOCK):
            return
        else:
            return main.CONNECTION_LOST
    for (cmsgLevel, cmsgType, cmsgData) in ancillary:
        if ((cmsgLevel == socket.SOL_SOCKET) and (cmsgType == sendmsg.SCM_RIGHTS)):
            self._ancillaryLevelSOLSOCKETTypeSCMRIGHTS(cmsgData)
        else:
            log.msg(format='%(protocolName)s    (on    %(hostAddress)r)    received    unsupported    ancillary    data    (level=%(cmsgLevel)r,    type=%(cmsgType)r)    from    %(peerAddress)r.', hostAddress=self.getHost(), peerAddress=self.getPeer(), protocolName=self._getLogPrefix(self.protocol), cmsgLevel=cmsgLevel, cmsgType=cmsgType)
    return self._dataReceived(data)
