MultiplayerSession Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents a multiplayer session.
[Windows.Foundation.Metadata.Activatable(typeof(Microsoft.Xbox.Services.Multiplayer.__IMultiplayerSessionFactory), 1)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Static(typeof(Microsoft.Xbox.Services.Multiplayer.__IMultiplayerSessionStatics), 1)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.Version(1)]
public sealed class MultiplayerSession
type MultiplayerSession = class
interface __IMultiplayerSessionPublicNonVirtuals
Public NotInheritable Class MultiplayerSession
- Inheritance
-
MultiplayerSession
- Attributes
-
Windows.Foundation.Metadata.ActivatableAttribute Windows.Foundation.Metadata.MarshalingBehaviorAttribute Windows.Foundation.Metadata.StaticAttribute Windows.Foundation.Metadata.ThreadingAttribute Windows.Foundation.Metadata.VersionAttribute
Constructors
MultiplayerSession(XboxLiveContext, MultiplayerSessionReference, UInt32, MultiplayerSessionVisibility, IVectorView<String>, String) | |
MultiplayerSession(XboxLiveContext, MultiplayerSessionReference) |
Creates a new MultiplayerSession without any constants, which allows the request to simply use whatever constants are already specified in the session template on the service. Those constants are returned in the response session data. |
MultiplayerSession(XboxLiveContext) |
Creates a new MultiplayerSession Class object from the supplied Xbox Live context, without any constants or session reference. |
Properties
ArbitrationServer |
An arbitration server that contains properties associated with a tournament games results. |
ArbitrationStatus |
Arbitration Status of a tournament |
Branch |
The branch of the session, used to scope change numbers. |
ChangeNumber |
The change number of the session. |
CurrentUser |
The current user in the session. A nullptr is returned if there is no current user in the session. |
DateOfNextTimer |
If any timeouts are in progress, this is the date and time when the the next timer fires. |
DateOfSession |
The date and time when the server returned the session. |
ETag |
The ETag returned with this session, used to determine if the session has been updated since it was last retrieved from the server. |
HostCandidates |
An ordered list of device tokens for host names that can be used for the session, ordered by the preference specified by MultiplayerSessionConstants::PeerToHostRequirements::HostSelectionMetric. |
InitializationStage |
Indicates the managed initialization stage, if the session is using managed initialization. The "stage" goes from "joining" to "measuring" to "evaluating". If episode 1 fails, then "stage" is set to "failed" and the session cannot be initialized. Otherwise, when an initialization episode completes, the "initialization" object is removed. If "externalEvaluation" is not set, "evaluating" is skipped. If "metrics" isn't set, "measuring" is skipped. |
InitializingEpisode |
The episode number associated with a set of session members requiring QoS metrics to be applied during managed initialization. |
InitializingStageStartTime |
The date and time when the initialization stage started during managed initialization. |
MatchmakingServer |
A multiplayer session server that contains properties associated with a target session reference. |
Members |
A list of all session members, including those who have been accepted and those who are waiting to join the session. |
MembersAccepted | |
MultiplayerCorrelationId |
A unique ID to the session used to query trace logs for entries that relate to the session. |
SearchHandleId |
A unique search handle ID to the session. |
ServersJson |
A JSON string containing a collection of servers for this multiplayer session. |
SessionConstants |
A set of constants associated with this session. These can only be set when creating the session. |
SessionProperties |
A set of properties associated with this session. Any player can modify these. |
SessionReference |
The unique identifying information for the session. |
SessionRoleTypes |
A set of role types associated with this session. |
StartTime |
The date and time that the session began. |
SubscribedChangeTypes |
Returns an OR'd set of MultiplayerSessionChangeTypes values representing the aspects of the session that the current xboxlivecontext is subscribed to, of None if there is none. |
TournamentsServer |
A multiplayer tournaments server that contains properties associated with a tournament reference. |
WriteStatus |
The status of a write operation when writing a session. |
Methods
_Init(XboxLiveContext, MultiplayerSessionReference, UInt32, MultiplayerSessionVisibility, IVectorView<String>, String) | |
AddMemberReservation(String, String, Boolean) |
Adds a new member reservation on the session for the specified Xbox user ID, member constants, and initialization request. |
AddMemberReservation(String, String) |
Adds a new member reservation on the session for the specified Xbox user ID and member constants. |
CompareMultiplayerSessions(MultiplayerSession, MultiplayerSession) |
Static compare method that compares two sessions and returns an Or'ed MultiplayerSessionChangeType. |
ConvertHttpStatusToWriteSessionStatus(Int32) |
Static method that converts an HTTP Status code to a WriteSessionStatus. |
DeleteCurrentUserMemberCustomPropertyJson(String) |
Delete a custom property on the current session member. |
DeleteSessionCustomPropertyJson(String) |
Deletes a session custom property. |
Join() |
Joins the user that either created or got the session to the session. |
Join(String, Boolean, Boolean) |
Joins the user that either created or got the session to the session, using the specified member constants, an initialization request, and a join condition. |
Join(String, Boolean) |
Joins the user that either created or got the session to the session, using the specified member constants and an initialization request. |
Join(String) |
Joins the user that either created or got the session to the session, using the specified member constants. It does not set an initialization request |
Leave() |
Removes the current member from a session. |
SetAllocateCloudCompute(Boolean) |
Sets the session properties/system/allocateCloudCompute field |
SetArbitrationTimeouts(TimeSpan, TimeSpan) |
Sets the arbitration timeouts for the session. |
SetClosed(Boolean) |
Sets the session status to closed, meaning that new users will not be able to join the session unless they already have a reservation. |
SetCloudComputePackageJson(String) |
Call multiplayer_service::write_session after this to write batched local changes to the service. This can only be set when creating a new session. Can only be specified if the 'cloudCompute' capability is set. Enables clients to request that a cloud compute instance be allocated on behalf of the session. |
SetCurrentUserArbitrationResults(IMapView<String,TournamentTeamResult>) | |
SetCurrentUserMemberCustomPropertyJson(String, String) |
Set a custom property on the current user to the specified JSON string The member must first be joined to the session. |
SetCurrentUserMembersInGroup(IVectorView<MultiplayerSessionMember>) | |
SetCurrentUserQualityOfServiceMeasurements(IVectorView<MultiplayerQualityOfServiceMeasurements>) | |
SetCurrentUserQualityOfServiceServerMeasurementsJson(String) |
Sets a JSON string with QoS measurements for the current session member. |
SetCurrentUserRoleInfo(IMapView<String,String>) | |
SetCurrentUserSecureDeviceAddressBase64(String) |
Sets the base64 encoded secure device address of the member. |
SetCurrentUserStatus(MultiplayerSessionMemberStatus) |
Set the multiplayer status of the current user to active or inactive. |
SetHostDeviceToken(String) |
Sets the device token of the host to use in multiplayer transactions. |
SetInitializationStatus(Boolean) |
Sets a flag that indicates if the session initialization succeeded, |
SetLocked(Boolean) |
Call multiplayer_service::write_session after this to write batched local changes to the service. If this is called without multiplayer_service::write_session, this will only change the local session object but does not commit it to the service. If set to 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. If the session is locked, it must also be set to closed. |
SetManagedInitialization(TimeSpan, TimeSpan, TimeSpan, Boolean, UInt32) |
Configures managed initialization parameters for a session. |
SetMatchmakingResubmit(Boolean) |
Sets a flag that indicates if a match is not successful and needs to be resubmitted, or if the match is successful and the matchmaking service can release the session. |
SetMatchmakingServerConnectionPath(String) |
Forces a specific server connection string to be used. This is useful in preserveSession=always cases. |
SetMatchmakingTargetSessionConstantsJson(String) |
Sets matchmaking constants for the session. |
SetMaxMembersInSession(UInt32) |
Sets the maximum number of members allowed in the session. |
SetMeasurementServerAddresses(IVectorView<QualityOfServiceServer>) | |
SetMemberInitialization(TimeSpan, TimeSpan, TimeSpan, Boolean, UInt32) |
Configures managed initialization parameters for a session. |
SetMutableRoleSettings(IMapView<String,MultiplayerRoleType>) | |
SetPeerToHostRequirements(TimeSpan, UInt32, UInt32, MultiplayMetrics) |
Sets thresholds that apply to each connection between a host candidate and a session member. |
SetPeerToPeerRequirements(TimeSpan, UInt32) |
Sets thresholds that apply to each pairwise connection for all members in a session. |
SetQualityOfServiceConnectivityMetrics(Boolean, Boolean, Boolean, Boolean) |
Enables or disables the connectivity metrics used to satisfy QoS requirements on the network for the session. |
SetServerConnectionStringCandidates(IVectorView<String>) | |
SetSessionCapabilities(MultiplayerSessionCapabilities) |
Sets the capabilities of the session. |
SetSessionChangeSubscription(MultiplayerSessionChangeTypes) |
Sets the set of session changes that this client will be subscribed to. Set to "MultiplayerSessionChangeTypes::None" to clear the subscription. |
SetSessionCustomPropertyJson(String, String) |
Set a session custom property to the specified JSON string. |
SetTimeouts(TimeSpan, TimeSpan, TimeSpan, TimeSpan) |
Sets the timeout values for the session. |
SetVisibility(MultiplayerSessionVisibility) |
Sets the visibility of the session. |