def METHOD_NAME(self, size: int) -> bytes:
    data = self._socket.recv(size)
    act_len = len(data)
    exp_len = size
    i = 1
    while act_len != exp_len:
        data += self._socket.recv(exp_len-act_len)
        act_len = len(data)
        i = i+1
    return data