

def recv(self, max_bytes):
    'Reads data from the socket.\n\n        This test object will return the next bytes that were added to this object using\n        the add_input method.  If not enough bytes are available, then will raise a timeout.\n        If the socket is closed, then returns None.\n\n        @param max_bytes: The maximum number of bytes to return.\n        '
    result = self.__stream.read(max_bytes)
    if (len(result) == 0):
        if self.__is_closed:
            return None
        else:
            raise socket.timeout()
    return result

dataset/ETHPy150Open scalyr/scalyr-agent-2/scalyr_agent/monitor_utils/tests/server_processors_test.py FakeSocket.recv/original