Master Server Connection

Strix requires a Master Server connection to obtain information to connect to room servers. Only one Master Server connection is allowed at a time.

Connection

A connection to a Master Server requires that the network has been initialized. (see Initialization and Termination). Connections to the Master Server are made through the use of the ConnectToMasterServer function. This function takes the Master Server’s host name and a port number. If you are using Strix Cloud, the host name is available on the Servers tab on your application dashboard under the label Master hostname, and the port number is 9122. You always need to provide them to ConnectToMasterServer function; the default values are unsuitable for use.

Successfully connecting to the Master Server enables the use of other Strix functions such as SearchNode.

Disconnection

The Master Server can be disconnected with the DisconnectMasterServer function. After disconnection, all functions that operate on the Master Server will fail, such as SearchNode. Typically, disconnecting the Master Server will take place when leaving the networked functionality of the game and before calling StopStrixNetwork.

Status

The IsMasterServerConnected function returns true if the Master Server is connected, or false if not.

The Master Server connection is not always active, as it will timeout and close the connection to save resources. However, new messages will reinitialize the connection before being sent, so this is not an issue and you do not need to manually reinitialize the connection.

Note

Timeout settings are set on the server. Contact Strix support if you need to customize these values for your application.