def rfcomm_recv (self, numbytes):
        if self.nonblocking and not self.received_data:
            # XXX are we supposed to raise an exception, or just return None?
            return None

        while not self.received_data and self._wc.is_connected ():
            self.rfcomm_read_msg ()

        if self.received_data:
            data = self.received_data.pop (0)
            if len(data) > numbytes:
                self.received_data.insert (0, data[numbytes:])
                return data[:numbytes]
            else:
                return data
dataset/ETHPy150Open kuri65536/python-for-android/python-modules/pybluez/bluetooth/widcomm.py/BluetoothSocket.rfcomm_recv/original