game / pragma.matchmaking / MatchmakingService /
MatchmakingService #
@ExperimentalCoroutinesApi
internal class MatchmakingService(pragmaNode: PragmaNode, instanceId: <ERROR CLASS>, uuidProxy: UUIDProxy = UUIDProxy(), matchmakingQueues: MatchmakingQueues = MatchmakingQueues(), sessionClient: SessionClient = SessionClient(), partyClient: PartyClient = PartyClient(), gameInstanceClient: GameInstanceClient = GameInstanceClient(), timeProxy: TimeProxy = TimeProxy.defaultInstance, randomProxy: RandomProxy = RandomProxy(), matchmakingSimulatorClient: MatchmakingSimulatorClient = MatchmakingSimulatorClient()) : DistributedService, ConfigHandler<MatchmakingConfig> , MatchReleaser
The MatchmakingService is a game loop service responsible for matching players together using configurable queues. The service maintains a collection of all active matchmaking queues, which it constantly iterates through on a configurable timer (MatchmakingConfig.matchmakingDelayMillis) attempting to make a match using the matchmaking plugin.
Constructors #
MatchmakingService | fun MatchmakingService(pragmaNode: PragmaNode, instanceId: <ERROR CLASS>, uuidProxy: UUIDProxy = UUIDProxy(), matchmakingQueues: MatchmakingQueues = MatchmakingQueues(), sessionClient: SessionClient = SessionClient(), partyClient: PartyClient = PartyClient(), gameInstanceClient: GameInstanceClient = GameInstanceClient(), timeProxy: TimeProxy = TimeProxy.defaultInstance, randomProxy: RandomProxy = RandomProxy(), matchmakingSimulatorClient: MatchmakingSimulatorClient = MatchmakingSimulatorClient()) |
Functions #
Name | Summary |
---|---|
Enters a group of players into matchmaking. | |
Enters a game instance into matchmaking. This endpoint is invoked from GameInstanceRpc.EnterMatchmakingV1Request and results in an Matchmaking.GameInstance being placed into a matchmaking queue. | |
Queries information on matchmaking queues. | |
Queries information on matchmaking queues. | |
Called from PartyService when a player leaves or is kicked from a party. Removes the whole party from matchmaking. | |
Allows a player to leave matchmaking. Removes their whole party from matchmaking. | |
Notification handler for player reconnect. Removes parties in matchmaking from queue if any player reconnects. | |
Notification handler for player disconnect. Removes parties in matchmaking from queue if any player disconnects. | |
Called from GameInstanceService when a game instance has requested to leave matchmaking. | |
Remove a GameServerVersion from matchmaking. Any players that were in queue for game server versions being removed will be removed from the game loop and sent a MatchmakingRpc.MatchmakingFailureV1Notification. | |
Called from GameInstanceService when players join or leave a game instance that is in matchmaking. | |
Called from GameInstanceService to update a matchmaking game instance with new data. |