> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# XblMultiplayerSetSubscriptionsEnabled

> XblMultiplayerSetSubscriptionsEnabled

# 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](/reference/live/xsapi-c/multiplayer_c/functions/xblmultiplayeraddsessionchangedhandler). 2. Automatic removal of members from sessions when the RTA connection underlying this multiplayer subscription is broken.

## Syntax

```cpp theme={null}
HRESULT XblMultiplayerSetSubscriptionsEnabled(  
         XblContextHandle xblContext,  
         bool subscriptionsEnabled  
)  
```

### Parameters

*xblContext*   \_In\_\
Type: [XblContextHandle](/reference/live/xsapi-c/types_c/handles/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](/reference/live/xsapi-c/multiplayer_c/multiplayer_c_members)


## Related topics

- [XblMultiplayerSubscriptionsEnabled](/reference/live/xsapi-c/multiplayer_c/functions/xblmultiplayersubscriptionsenabled.md)
- [Multiplayer Session Directory overview](/services/xbox-services/multiplayer/mpsd/live-mpsd-overview.md)
- [XblMultiplayerAddSessionChangedHandler](/reference/live/xsapi-c/multiplayer_c/functions/xblmultiplayeraddsessionchangedhandler.md)
- [Moving from MPSD to PlayFab Multiplayer and MPA](/services/xbox-services/multiplayer/mpsd/concepts/live-mpsd-to-mlp.md)
- [Multiplayer tasks](/services/xbox-services/multiplayer/mpsd/how-to/live-mpsd-how-tos.md)
