Network Messages

Action Messages

  • CLIENT_SET_SWAA_LEVEL - Sets the software anti-alias quality level to the specified value. This message is broadcastable.

    Parameters:

    • clientSWAAlevel (int) - The display quality level: 0-9.

  • CONNECT_TO_SERVER - Connects to the specified server. The current session becomes a client of the server's session.

    Parameters:

    • name (unicode) - The name of the client.

    • host (unicode) - The name of the server.

    • port (int) - The port number on the server.

    • sync (bool) - True to synchronize the client's internal clock from the server clock.

  • DISCONNECT_FROM_SERVER - Disconnects this session from the server.

  • END_SERVER - Stops the server associated with the current session.

    Parameters:

    • port (int) - The port number that the server is listening on.

  • HOST_PORT_CHANGED - Updates the current hosting port.

    Parameters:

    • port (unicode) - Unicode representation of the new port number.

  • SPECTATOR_HOST_CHANGED - Updates the name of the spectator's (client's) host.

    Parameters:

    • hostName (unicode) - The new host name in unicode.

  • SPECTATOR_PORT_CHANGED - Updates the current spectator (client) port.

    Parameters:

    • port (unicode) - The new port number in unicode.

  • START_SERVER - Starts the hosting server within the current session.

    Parameters:

    • sessionName (unicode) - The name of the session the server is hosting.

    • machineName (unicode) - The name of the host machine.

    • port (int) - The port number on which to start the server.

    • clockSync (bool) - True to maintain clock synchronization with clients. Typically set to False.

Information Messages

  • CLIENT_ALL_LOADED - Internal message. Notification on a server that all clients are finished loading all files.

  • CLIENT_CONNECTION_STATUS - Disconnects the client if the connection status is not valid.

    Parameters:

    • status (bool) - The status flag for the client connection, True or False.

    • message (unicode) - The message about the connection status.

  • CLIENT_DISCONNECTED - Indicates that a client has disconnected. This message is broadcastable.

    Parameters:

    • id (int) - The client's ID.

    • name (unicode) - The client name.

  • CLIENT_LIST_CHANGED - Indicates the current list of connected clients. Sent any time a new client connects or disconnects. This message is broadcastable.

    Parameters:

    • clientList (list) - The current list of connected clients.

  • CLIENT_LOADED - Internal message. Notification from a client to the server that a client has finished loading all files.

    Parameters:

    • id (int) - The ID of the client.

  • CLIENT_LOADING - Internal message. Notification from a client to the server that a client is loading a file.

    Parameters:

    • id (int) - The ID of the client.

  • CLIENT_STILL_LOADING - Internal message. Notification on a server that one or more clients are still loading files.

  • NETWORK_CONNECTION_CHANGED - Indicates that a network connection from the named host has been accepted or rejected.

    Parameters:

    • accepted (bool) - True if the connection was accepted, False otherwise.

    • host (unicode) - The address of the connection.

  • NEW_CLIENT_CONNECTED - Indicates that a new client has connected to the server.

    Parameters:

    • ID (int) - The new client's ID.

    • name (unicode) - The client name.

  • NEW_CLIENT_ID - Notifies the client of their unique client ID once they successfully connect to the server.

    Parameters:

    • ID (int) - The new client ID.

    • serverClock (float) - The time on the server.

    • sync (bool) - True to synchronize the client's internal clock from the server clock.

  • SERVER_STATUS - Indicates the status of the server to show whether it is ready to host or not.

    Parameters:

    • serverRunning (bool) - The server status.

    • sessionName (unicode) - The name of the session the server is hosting.

    • machineName (unicode) - The name of the host machine.

    • port (int) - The port number for the session.

    • msg (unicode) - The message to display to the user.