def recvall(client_socket, packet_size):
    """
    Keep receiving up to `packet_size` bytes, returning partial result
    if connection closed normally by remote.

    Params:
        client_socket (socket.socket() object) : client socket connection to webserver
        packet_size (int) : packet size of message
    
    Returns:
        byte string of message received from webserver
    """
    data_buffer = []
    # i = 0
    while packet_size:
        # print('Packet Size',packet_size)
        data = client_socket.recv(packet_size)
        print('Receiving', len(data))
        # print('Data Length',len(data))
        if not data:
            break
        packet_size -= len(data)
        data_buffer.append(data)
        # print('Number of Iterations per Recvall Call',i)
        # i+=1
    return b"".join(data_buffer)