'received length-prefixed message'

def recv(self):

    size_data = self._readn(4)
    if (len(size_data) == 0):
        return size_data
    size = toint(size_data)
    if (size > 10000):
        self._logger.debug('btconn:    waiting    for    message    size    %d', size)
    if (size == 0):
        return self.recv()
    else:
        return self._readn(size)
