MultiplayerService.GetCurrentSessionAsync(MultiplayerSessionReference) Method
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.
Gets a session object, with all of its attributes, from the server.
public Windows.Foundation.IAsyncOperation<Microsoft.Xbox.Services.Multiplayer.MultiplayerSession> GetCurrentSessionAsync (Microsoft.Xbox.Services.Multiplayer.MultiplayerSessionReference sessionReference);
abstract member GetCurrentSessionAsync : Microsoft.Xbox.Services.Multiplayer.MultiplayerSessionReference -> Windows.Foundation.IAsyncOperation<Microsoft.Xbox.Services.Multiplayer.MultiplayerSession>
override this.GetCurrentSessionAsync : Microsoft.Xbox.Services.Multiplayer.MultiplayerSessionReference -> Windows.Foundation.IAsyncOperation<Microsoft.Xbox.Services.Multiplayer.MultiplayerSession>
Public Function GetCurrentSessionAsync (sessionReference As MultiplayerSessionReference) As IAsyncOperation(Of MultiplayerSession)
Parameters
- sessionReference
- MultiplayerSessionReference
A MultiplayerSessionReference object that contains identifying information for the session.
Returns
Returns an IAsyncOperation<TResult> object that represents the state of the asynchronous operation. Completion of the asynchronous operation is signaled by using a handler that is passed to the IAsyncOperation<TResult>.Completed property. When the asynchronous operation is complete, the result of the operation can be retrieved by using the IAsyncOperation<TResult>.GetResults method.
The result is a MultiplayerSession object containing the response returned from the server.
Implements
Remarks
If the client tries to get a session that does not exist, this method returns an HTTP/204 status code. Additionally an exception is thrown for trying to retrieve a nonexistent session.
Calls V102 GET /serviceconfigs/{serviceConfigurationId}/sessionTemplates/{sessiontemplateName}/sessions/{sessionName}