Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Implements

Index

Constructors

constructor

Properties

Readonly config

The resolved configuration of MatchmakerServiceClient class. This is resolved and normalized from the constructor configuration interface.

middlewareStack

middlewareStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>

Methods

destroy

  • destroy(): void
  • Destroy underlying resources, like sockets. It's usually not necessary to do this. However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed. Otherwise, sockets might stay open for quite a long time before the server terminates them.

    Returns void

findLobby

  • Finds a lobby based on the given criteria.

    If a lobby is not found and prevent_auto_create_lobby is true, a new lobby will be created.

    Parameters

    Returns Promise<FindLobbyCommandOutput>

  • Finds a lobby based on the given criteria. If a lobby is not found and prevent_auto_create_lobby is true, a new lobby will be created.

    Parameters

    Returns void

  • Finds a lobby based on the given criteria. If a lobby is not found and prevent_auto_create_lobby is true, a new lobby will be created.

    Parameters

    Returns void

  • Finds a lobby based on the given criteria.

    If a lobby is not found and prevent_auto_create_lobby is true, a new lobby will be created.

    Parameters

    • args: FindLobbyCommandInput
    • Optional options: __HttpHandlerOptions

    Returns Promise<FindLobbyCommandOutput>

  • Finds a lobby based on the given criteria. If a lobby is not found and prevent_auto_create_lobby is true, a new lobby will be created.

    Parameters

    Returns void

  • Finds a lobby based on the given criteria. If a lobby is not found and prevent_auto_create_lobby is true, a new lobby will be created.

    Parameters

    Returns void

joinLobby

  • Joins a specific lobby.

    This request will use the direct player count configured for the lobby group.

    Parameters

    Returns Promise<JoinLobbyCommandOutput>

  • Joins a specific lobby. This request will use the direct player count configured for the lobby group.

    Parameters

    Returns void

  • Joins a specific lobby. This request will use the direct player count configured for the lobby group.

    Parameters

    Returns void

  • Joins a specific lobby.

    This request will use the direct player count configured for the lobby group.

    Parameters

    • args: JoinLobbyCommandInput
    • Optional options: __HttpHandlerOptions

    Returns Promise<JoinLobbyCommandOutput>

  • Joins a specific lobby. This request will use the direct player count configured for the lobby group.

    Parameters

    Returns void

  • Joins a specific lobby. This request will use the direct player count configured for the lobby group.

    Parameters

    Returns void

listLobbies

listRegions

  • Returns a list of regions available to this namespace.

    Regions are sorted by most optimal to least optimal. The player's IP address is used to calculate the regions' optimality.

    Parameters

    Returns Promise<ListRegionsCommandOutput>

  • Returns a list of regions available to this namespace. Regions are sorted by most optimal to least optimal. The player's IP address is used to calculate the regions' optimality.

    Parameters

    Returns void

  • Returns a list of regions available to this namespace. Regions are sorted by most optimal to least optimal. The player's IP address is used to calculate the regions' optimality.

    Parameters

    Returns void

  • Returns a list of regions available to this namespace.

    Regions are sorted by most optimal to least optimal. The player's IP address is used to calculate the regions' optimality.

    Parameters

    • args: ListRegionsCommandInput
    • Optional options: __HttpHandlerOptions

    Returns Promise<ListRegionsCommandOutput>

  • Returns a list of regions available to this namespace. Regions are sorted by most optimal to least optimal. The player's IP address is used to calculate the regions' optimality.

    Parameters

    Returns void

  • Returns a list of regions available to this namespace. Regions are sorted by most optimal to least optimal. The player's IP address is used to calculate the regions' optimality.

    Parameters

    Returns void

lobbyReady

  • Marks the current lobby as ready to accept connections. Players will not be able to connect to this lobby until the lobby is flagged as ready.

    Parameters

    Returns Promise<LobbyReadyCommandOutput>

  • Marks the current lobby as ready to accept connections. Players will not be able to connect to this lobby until the lobby is flagged as ready.

    Parameters

    Returns void

  • Marks the current lobby as ready to accept connections. Players will not be able to connect to this lobby until the lobby is flagged as ready.

    Parameters

    Returns void

  • Marks the current lobby as ready to accept connections. Players will not be able to connect to this lobby until the lobby is flagged as ready.

    Parameters

    • args: LobbyReadyCommandInput
    • Optional options: __HttpHandlerOptions

    Returns Promise<LobbyReadyCommandOutput>

  • Marks the current lobby as ready to accept connections. Players will not be able to connect to this lobby until the lobby is flagged as ready.

    Parameters

    Returns void

  • Marks the current lobby as ready to accept connections. Players will not be able to connect to this lobby until the lobby is flagged as ready.

    Parameters

    Returns void

playerConnected

  • Validates the player token is valid and has not already been consumed then marks the player as connected.

    Player Tokens and Reserved Slots

    Player tokens reserve a spot in the lobby until they expire. This allows for precise matchmaking up to exactly the lobby's player limit, which is important for games with small lobbies and a high influx of players.

    By calling this endpoint with the player token, the player's spot is marked as connected and will not expire. If this endpoint is never called, the player's token will expire and this spot will be filled by another player.

    Anti-Botting

    Player tokens are only issued by caling rivet.api.matchmaker#JoinLobby, calling rivet.api.matchmaker#FindLobby, or from the rivet.api.identity.common#GlobalEventMatchmakerLobbyJoin event. These endpoints have anti-botting measures (i.e. enforcing max player limits, captchas, and detecting bots), so valid player tokens provide some confidence that the player is not a bot.

    Therefore, it's important to make sure the token is valid by waiting for this endpoint to return OK before allowing the connected socket to do anything else. If this endpoint returns an error, the socket should be disconnected immediately.

    How to Transmit the Player Token

    The client is responsible for acquiring the player token by caling rivet.api.matchmaker#JoinLobby, calling rivet.api.matchmaker#FindLobby, or from the rivet.api.identity.common#GlobalEventMatchmakerLobbyJoin event. Beyond that, it's up to the developer how the player token is transmitted to the lobby.

    If using WebSockets, the player token can be transmitted as a query paramter.

    Otherwise, the player token will likely be automatically sent by the client once the socket opens. As mentioned above, nothing else should happen until the player token is validated.

    Parameters

    Returns Promise<PlayerConnectedCommandOutput>

  • Validates the player token is valid and has not already been consumed then marks the player as connected.

    Player Tokens and Reserved Slots

    Player tokens reserve a spot in the lobby until they expire. This allows for precise matchmaking up to exactly the lobby's player limit, which is important for games with small lobbies and a high influx of players. By calling this endpoint with the player token, the player's spot is marked as connected and will not expire. If this endpoint is never called, the player's token will expire and this spot will be filled by another player.

    Anti-Botting

    Player tokens are only issued by caling rivet.api.matchmaker#JoinLobby, calling rivet.api.matchmaker#FindLobby, or from the rivet.api.identity.common#GlobalEventMatchmakerLobbyJoin event. These endpoints have anti-botting measures (i.e. enforcing max player limits, captchas, and detecting bots), so valid player tokens provide some confidence that the player is not a bot. Therefore, it's important to make sure the token is valid by waiting for this endpoint to return OK before allowing the connected socket to do anything else. If this endpoint returns an error, the socket should be disconnected immediately.

    How to Transmit the Player Token

    The client is responsible for acquiring the player token by caling rivet.api.matchmaker#JoinLobby, calling rivet.api.matchmaker#FindLobby, or from the rivet.api.identity.common#GlobalEventMatchmakerLobbyJoin event. Beyond that, it's up to the developer how the player token is transmitted to the lobby. If using WebSockets, the player token can be transmitted as a query paramter. Otherwise, the player token will likely be automatically sent by the client once the socket opens. As mentioned above, nothing else should happen until the player token is validated.

    Parameters

    Returns void

  • Validates the player token is valid and has not already been consumed then marks the player as connected.

    Player Tokens and Reserved Slots

    Player tokens reserve a spot in the lobby until they expire. This allows for precise matchmaking up to exactly the lobby's player limit, which is important for games with small lobbies and a high influx of players. By calling this endpoint with the player token, the player's spot is marked as connected and will not expire. If this endpoint is never called, the player's token will expire and this spot will be filled by another player.

    Anti-Botting

    Player tokens are only issued by caling rivet.api.matchmaker#JoinLobby, calling rivet.api.matchmaker#FindLobby, or from the rivet.api.identity.common#GlobalEventMatchmakerLobbyJoin event. These endpoints have anti-botting measures (i.e. enforcing max player limits, captchas, and detecting bots), so valid player tokens provide some confidence that the player is not a bot. Therefore, it's important to make sure the token is valid by waiting for this endpoint to return OK before allowing the connected socket to do anything else. If this endpoint returns an error, the socket should be disconnected immediately.

    How to Transmit the Player Token

    The client is responsible for acquiring the player token by caling rivet.api.matchmaker#JoinLobby, calling rivet.api.matchmaker#FindLobby, or from the rivet.api.identity.common#GlobalEventMatchmakerLobbyJoin event. Beyond that, it's up to the developer how the player token is transmitted to the lobby. If using WebSockets, the player token can be transmitted as a query paramter. Otherwise, the player token will likely be automatically sent by the client once the socket opens. As mentioned above, nothing else should happen until the player token is validated.

    Parameters

    Returns void

  • Validates the player token is valid and has not already been consumed then marks the player as connected.

    Player Tokens and Reserved Slots

    Player tokens reserve a spot in the lobby until they expire. This allows for precise matchmaking up to exactly the lobby's player limit, which is important for games with small lobbies and a high influx of players.

    By calling this endpoint with the player token, the player's spot is marked as connected and will not expire. If this endpoint is never called, the player's token will expire and this spot will be filled by another player.

    Anti-Botting

    Player tokens are only issued by caling rivet.api.matchmaker#JoinLobby, calling rivet.api.matchmaker#FindLobby, or from the rivet.api.identity.common#GlobalEventMatchmakerLobbyJoin event. These endpoints have anti-botting measures (i.e. enforcing max player limits, captchas, and detecting bots), so valid player tokens provide some confidence that the player is not a bot.

    Therefore, it's important to make sure the token is valid by waiting for this endpoint to return OK before allowing the connected socket to do anything else. If this endpoint returns an error, the socket should be disconnected immediately.

    How to Transmit the Player Token

    The client is responsible for acquiring the player token by caling rivet.api.matchmaker#JoinLobby, calling rivet.api.matchmaker#FindLobby, or from the rivet.api.identity.common#GlobalEventMatchmakerLobbyJoin event. Beyond that, it's up to the developer how the player token is transmitted to the lobby.

    If using WebSockets, the player token can be transmitted as a query paramter.

    Otherwise, the player token will likely be automatically sent by the client once the socket opens. As mentioned above, nothing else should happen until the player token is validated.

    Parameters

    • args: PlayerConnectedCommandInput
    • Optional options: __HttpHandlerOptions

    Returns Promise<PlayerConnectedCommandOutput>

  • Validates the player token is valid and has not already been consumed then marks the player as connected.

    Player Tokens and Reserved Slots

    Player tokens reserve a spot in the lobby until they expire. This allows for precise matchmaking up to exactly the lobby's player limit, which is important for games with small lobbies and a high influx of players. By calling this endpoint with the player token, the player's spot is marked as connected and will not expire. If this endpoint is never called, the player's token will expire and this spot will be filled by another player.

    Anti-Botting

    Player tokens are only issued by caling rivet.api.matchmaker#JoinLobby, calling rivet.api.matchmaker#FindLobby, or from the rivet.api.identity.common#GlobalEventMatchmakerLobbyJoin event. These endpoints have anti-botting measures (i.e. enforcing max player limits, captchas, and detecting bots), so valid player tokens provide some confidence that the player is not a bot. Therefore, it's important to make sure the token is valid by waiting for this endpoint to return OK before allowing the connected socket to do anything else. If this endpoint returns an error, the socket should be disconnected immediately.

    How to Transmit the Player Token

    The client is responsible for acquiring the player token by caling rivet.api.matchmaker#JoinLobby, calling rivet.api.matchmaker#FindLobby, or from the rivet.api.identity.common#GlobalEventMatchmakerLobbyJoin event. Beyond that, it's up to the developer how the player token is transmitted to the lobby. If using WebSockets, the player token can be transmitted as a query paramter. Otherwise, the player token will likely be automatically sent by the client once the socket opens. As mentioned above, nothing else should happen until the player token is validated.

    Parameters

    Returns void

  • Validates the player token is valid and has not already been consumed then marks the player as connected.

    Player Tokens and Reserved Slots

    Player tokens reserve a spot in the lobby until they expire. This allows for precise matchmaking up to exactly the lobby's player limit, which is important for games with small lobbies and a high influx of players. By calling this endpoint with the player token, the player's spot is marked as connected and will not expire. If this endpoint is never called, the player's token will expire and this spot will be filled by another player.

    Anti-Botting

    Player tokens are only issued by caling rivet.api.matchmaker#JoinLobby, calling rivet.api.matchmaker#FindLobby, or from the rivet.api.identity.common#GlobalEventMatchmakerLobbyJoin event. These endpoints have anti-botting measures (i.e. enforcing max player limits, captchas, and detecting bots), so valid player tokens provide some confidence that the player is not a bot. Therefore, it's important to make sure the token is valid by waiting for this endpoint to return OK before allowing the connected socket to do anything else. If this endpoint returns an error, the socket should be disconnected immediately.

    How to Transmit the Player Token

    The client is responsible for acquiring the player token by caling rivet.api.matchmaker#JoinLobby, calling rivet.api.matchmaker#FindLobby, or from the rivet.api.identity.common#GlobalEventMatchmakerLobbyJoin event. Beyond that, it's up to the developer how the player token is transmitted to the lobby. If using WebSockets, the player token can be transmitted as a query paramter. Otherwise, the player token will likely be automatically sent by the client once the socket opens. As mentioned above, nothing else should happen until the player token is validated.

    Parameters

    Returns void

playerDisconnected

  • Marks a player as disconnected.

    Ghost Players

    If players are not marked as disconnected, lobbies will result with "ghost players" that the matchmaker thinks exist but are no longer connected to the lobby.

    Parameters

    Returns Promise<PlayerDisconnectedCommandOutput>

  • Marks a player as disconnected.

    Ghost Players

    If players are not marked as disconnected, lobbies will result with "ghost players" that the matchmaker thinks exist but are no longer connected to the lobby.

    Parameters

    Returns void

  • Marks a player as disconnected.

    Ghost Players

    If players are not marked as disconnected, lobbies will result with "ghost players" that the matchmaker thinks exist but are no longer connected to the lobby.

    Parameters

    Returns void

  • Marks a player as disconnected.

    Ghost Players

    If players are not marked as disconnected, lobbies will result with "ghost players" that the matchmaker thinks exist but are no longer connected to the lobby.

    Parameters

    • args: PlayerDisconnectedCommandInput
    • Optional options: __HttpHandlerOptions

    Returns Promise<PlayerDisconnectedCommandOutput>

  • Marks a player as disconnected.

    Ghost Players

    If players are not marked as disconnected, lobbies will result with "ghost players" that the matchmaker thinks exist but are no longer connected to the lobby.

    Parameters

    Returns void

  • Marks a player as disconnected.

    Ghost Players

    If players are not marked as disconnected, lobbies will result with "ghost players" that the matchmaker thinks exist but are no longer connected to the lobby.

    Parameters

    Returns void

send

setLobbyClosed

  • If is_closed is true, players will be prevented from joining the lobby.

    Does not shutdown the lobby.

    Parameters

    Returns Promise<SetLobbyClosedCommandOutput>

  • If is_closed is true, players will be prevented from joining the lobby. Does not shutdown the lobby.

    Parameters

    Returns void

  • If is_closed is true, players will be prevented from joining the lobby. Does not shutdown the lobby.

    Parameters

    Returns void

  • If is_closed is true, players will be prevented from joining the lobby.

    Does not shutdown the lobby.

    Parameters

    • args: SetLobbyClosedCommandInput
    • Optional options: __HttpHandlerOptions

    Returns Promise<SetLobbyClosedCommandOutput>

  • If is_closed is true, players will be prevented from joining the lobby. Does not shutdown the lobby.

    Parameters

    Returns void

  • If is_closed is true, players will be prevented from joining the lobby. Does not shutdown the lobby.

    Parameters

    Returns void