Compartilhar via


XblMultiplayerSetSubscriptionsEnabled

Explicitly starts or stops the multiplayer service connectivity via RTA. Enabling the RTA subscription enables: 1. Callbacks when the local Users's sessions change, using the MultiplayerSession object. Handlers are added with XblMultiplayerAddSessionChangedHandler. 2. Automatic removal of members from sessions when the RTA connection underlying this multiplayer subscription is broken.

Syntax

HRESULT XblMultiplayerSetSubscriptionsEnabled(  
         XblContextHandle xblContext,  
         bool subscriptionsEnabled  
)  

Parameters

xblContext   _In_
Type: XblContextHandle

Xbox live context for the local user.

subscriptionsEnabled   _In_
Type: bool

True to enable subscriptions and false to stop them.

Return value

Type: HRESULT

HRESULT return code for this API operation.

Remarks

This method immediately enables the RTA connection, but the in order to receive session changed callbacks, the session must be written again after enabling sunscriptions.

Requirements

Header: multiplayer_c.h

Library: Microsoft.Xbox.Services.14x.GDK.C.lib

See also

multiplayer_c