'Try to receive any application-level bytes which are now available
because of a previous write into the receive BIO.  This will take
care of delivering any application-level bytes which are received to
the protocol, as well as handling of the various exceptions which
can come from trying to get such bytes.'

def _flushReceiveBIO(self):

    while (not self._lostTLSConnection):
        try:
            bytes = self._tlsConnection.recv((2 ** 15))
        except WantReadError:
            break
        except ZeroReturnError:
            self._shutdownTLS()
            self._tlsShutdownFinished(None)
        except Error:
            failure = Failure()
            self._tlsShutdownFinished(failure)
        else:
            if (not self._aborted):
                ProtocolWrapper.dataReceived(self, bytes)
    self._flushSendBIO()
