Edit

Share via


MultiplayerSessionProperties Class

Definition

Represents multiplayer session properties.

[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.Version(1)]
public sealed class MultiplayerSessionProperties
type MultiplayerSessionProperties = class
    interface __IMultiplayerSessionPropertiesPublicNonVirtuals
Public NotInheritable Class MultiplayerSessionProperties
Inheritance
MultiplayerSessionProperties
Attributes
Windows.Foundation.Metadata.MarshalingBehaviorAttribute Windows.Foundation.Metadata.ThreadingAttribute Windows.Foundation.Metadata.VersionAttribute

Examples

The following example shows the format of the JSON object that represents this class:

"properties": {
       "system": {
           "keywords": [
               "hello"
           ],
           "turn": [
               0
           ],
           "host": "99e4c701",
           "initializationSucceeded": true,
           "joinRestriction": "None",
           "readRestriction": "None",
           "serverConnectionStringCandidates": [
               "west.azure.com",
               "east.azure.com"
           ],
           "matchmaking": {
               "clientResult": {
                   "status": "Searching",
                   "statusDetails": "Description",
                   "typicalWait": 30,
                   "targetSessionRef": {
                       "scid": "1ECFDB89-36EB-4E59-8901-11F7393689AE",
                       "templateName": "capture-the-flag",
                       "name": "2D58F65F-0E3C-4F1F-8277-2BC9873FDB23"
                   }
               },
               "targetSessionConstants": {},
               "serverConnectionString": "west.azure.com"
           },
           "matchmakingResubmit": true
       },
       "custom": {}
   },

Properties

AllocateCloudCompute

A value that indicates if there is an outstanding request to allocate. Set to true to indicate that the client would like an allocation. Set to false to cancel the allocation request. MPSD will remove this property entirely if the allocation has failed.

Closed

A value that indicates if the session is closed. Thsi value controls whether a session is joinable, independent of visibility, joinrestriction, and available space in the session. Does not affect reservations. Defaults to false.

HostDeviceToken

A token representing the host device. Must match the "deviceToken" of at least one member, otherwise this field is deleted. If "peerToHostRequirements" is set and "host" is set, the measurement stage assumes that the given host is the correct host and only measures metrics to that host.

JoinRestriction

Gets or sets the restriction that is applied to members when joining an open session. Defaults to "none".

Keywords

(Optional) A collection of case-insensitive keywords associated with the session. This value can be empty. When changing keywords, call MultiplayerService::WriteSessionAsync to write the changes to the service.

Locked

If true, it would allow the members of the session to be locked, such that if a user leaves they are able to come back into the session but no other user could take that spot. Defaults to false.

MatchmakingServerConnectionString

Force a specific connection string to be used, which is useful for join in progress scenarios.

MatchmakingTargetSessionConstantsJson

A JSON string of title-defined constants for the target session to use in matchmaking.

ReadRestriction

Gets or sets the restriction that is applied to members when reading an open session. Defaults to "none".

ServerConnectionStringCandidates

The ordered list of connection strings that the session can use to connect to a game server. Generally titles should use the first on the list, but sophisticated titles could use a custom mechanism for choosing one of the others (e.g. based on load).

SessionCustomPropertiesJson

A JSON string that specifies the custom properties for the session. These can be changed anytime. When changing, call MultiplayerService::WriteSessionAsync to write the changes to the service.

SessionOwnerIndices

Member index of owners of the session.

TurnCollection

A collection of MultiplayerSessionMember objects indicating who has played turns in the sessions. When changing, call MultiplayerService::WriteSessionAsync to write the changes to the service.

Applies to