Grpc Alpha
The GrpcAlpha class provides gRPC-based implementations for all interfaces of the Alpha-Channel of the Agones SDK. The implementation encapsulates the communication the external interface of the SDK and manages the corresponding stubs. This sub SDK operates on the same channel as the primary SDK and therefore shares its connections and related resources as well as its state.
The creation of this object only creates the necessary stub and does not initiate any communication to the external SDK interface. It merely equips the SDK with means to communicate with the SDK, if requested by invoking any of the provided Alpha interfaces.
Parameters
The channel of the primary Agones SDK that is used for the communication with the external network interface and that holds the related connections and resources.
Functions
Retrieves the unique identifiers of the current players associated with (and therefore connected to) this instance. The return value is guaranteed to match the value set within the SDK, even if the value was not yet synchronized with the Kubernetes resource.
Retrieves whether a player with a specific identifier is currently connected to this instance and is therefore present on the player list of this instance. The return value is guaranteed to match the value set within the SDK, even if the value was not yet synchronized with the Kubernetes resource.
Retrieves the current capacity for the number of players that can be connected to this instance simultaneously. Once this capacity is reached, no further players can be added to this instance. The return value is guaranteed to match the value set within the SDK, even if this value was not yet synchronized with the Kubernetes resource.
Sets a new capacity for the number of players that can be connected to this instance simultaneously. The limit will not be enforced retroactively. That means, if there are currently more players on this instance, than the new capacity would allow, no new players will be allowed to connect on this instance, but existing players will not be disconnected from this instance.
Adds a player with a specific unique identifier to the player list of this instance. This will increase the active player count and add the identifier to the Kubernetes resource eventually. The player will be guaranteed to be part of the player list of this instance, unless this instance is already full. The returned value is guaranteed to match the value set within the SDK, even if the value was not yet synchronized with the Kubernetes resource.
Retrieves the current number of players that are connected to this instance simultaneously. The return value is guaranteed to match the value set within the SDK, even if the value was not yet synchronized with the Kubernetes resource.
Removes a player with a specific unique identifier from the player list of this instance. This will decrease the active player count and remove the identifier from the Kubernetes resource eventually. The player will then no longer be part of this instance. The return value is guaranteed to match the value set within the SDK, even if the value was not yet synchronized with the Kubernetes resource.