def recieve(sock):
    """Recieve a message as a JSON string from the specified TCP socket.

    Returns:
        JSON representation of a Message, ready to be used in Message.fromJSON.
    Raises:
        ConnectionAbortedError when null is read from the first 8 bytes.
    """
    msgLen = int.from_bytes(sock.recv(2).strip(), byteorder='big')
    if msgLen == 0:
        raise ConnectionAbortedError
    return sock.recv(msgLen).decode('utf-8')