PlayerSession class

Properties describing a player session. Player session objects are created either by creating a player session for a specific game session, or as part of a game session placement. A player session represents either a player reservation for a game session (status RESERVED) or actual player activity in a game session (status ACTIVE). A player session object (including player data) is automatically passed to a game session when the player connects to the game session and is validated.

When a player disconnects, the player session status changes to COMPLETED. Once the session ends, the player session object is retained for 30 days and then removed.

Constructors

PlayerSession({DateTime? creationTime, String? dnsName, String? fleetArn, String? fleetId, String? gameSessionId, String? ipAddress, String? playerData, String? playerId, String? playerSessionId, int? port, PlayerSessionStatus? status, DateTime? terminationTime})
PlayerSession.fromJson(Map<String, dynamic> json)
factory

Properties

creationTime DateTime?
Time stamp indicating when this data object was created. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").
final
dnsName String?
DNS identifier assigned to the instance that is running the game session. Values have the following format:
final
fleetArn String?
The Amazon Resource Name (ARN) associated with the GameLift fleet that the player's game session is running on.
final
fleetId String?
A unique identifier for a fleet that the player's game session is running on.
final
gameSessionId String?
A unique identifier for the game session that the player session is connected to.
final
hashCode int
The hash code for this object.
no setterinherited
ipAddress String?
IP address of the instance that is running the game session. When connecting to a Amazon GameLift game server, a client needs to reference an IP address (or DNS name) and port number.
final
playerData String?
Developer-defined information related to a player. Amazon GameLift does not use this data, so it can be formatted as needed for use in the game.
final
playerId String?
A unique identifier for a player that is associated with this player session.
final
playerSessionId String?
A unique identifier for a player session.
final
port int?
Port number for the game session. To connect to a Amazon GameLift server process, an app needs both the IP address and port number.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
status PlayerSessionStatus?
Current status of the player session.
final
terminationTime DateTime?
Time stamp indicating when this data object was terminated. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited