MatchmakingClient

colosseumrl.matchmaking.MatchmakingClient.request_game(hostname: str, port: int, username: str, password: str = '') → colosseumrl.matchmaking.MatchmakingClient.GameResponse[source]

Contact a matchmaking server and ask for a new game.

This function will block until enough players connect to create a server.

Parameters
  • hostname (str)

  • port (int) – Hostname and port of the remote matchmaking server

  • username (str) – Username that will identify you in the game.

  • password (str) – Password to confirm your identity for ranking and other metadata.

Returns

host: str

Hostname of the assigned gamer server.

port: int

Port of the game server that was created for you

username: str

Your username again to verify.

token: str

Authentication string you will need to provide to connect to the match server

Return type

GameResponse

See also

colosseumrl.matchmaking.MatchmakingClient.GameResponse()

The named tuple that will be returned by this function.

class colosseumrl.matchmaking.MatchmakingClient.GameResponse[source]

The container object for the response from the server.

property host

Alias for field number 0

property port

Alias for field number 1

property ranking

Alias for field number 4

property token

Alias for field number 3

property username

Alias for field number 2