> ## 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.

# XGameStreamingGetClientCount

> XGameStreamingGetClientCount

# XGameStreamingGetClientCount

Get the number of clients which are currently streaming the game.

## Syntax

```cpp theme={null}
uint32_t XGameStreamingGetClientCount()
```

### Parameters

None

### Return value

Type: uint32\_t

Returns the number of clients which are currently streaming the game.

## Remarks

Returns the number of clients which are currently streaming the game. This value may be zero if no clients are currently streaming.

Use this to get the count of connected devices before allocating memory for the call to [XGameStreamingGetClients](/reference/system/xgamestreaming/functions/xgamestreaminggetclients).

If the game is only trying to identify if ANY device is connected and streaming, consider using [XGameStreamingIsStreaming](/reference/system/xgamestreaming/functions/xgamestreamingisstreaming).

If the game wants to get notifcation when a streaming client connects and/or disconnects, consider using [XGameStreamingRegisterConnectionStateChanged](/reference/system/xgamestreaming/functions/xgamestreamingregisterconnectionstatechanged).

## Requirements

**Header:** xgamestreaming.h\
**Library:** xgameruntime.lib\
**Supported platforms:** Windows, XBOX One family consoles and XBOX Series consoles

## See also

[XGameStreamingIsStreaming](/reference/system/xgamestreaming/functions/xgamestreamingisstreaming)\
[XGameStreamingRegisterConnectionStateChanged](/reference/system/xgamestreaming/functions/xgamestreamingregisterconnectionstatechanged)\
[XGameStreamingGetClients](/reference/system/xgamestreaming/functions/xgamestreaminggetclients)\
[XGameStreaming](/reference/system/xgamestreaming/xgamestreaming_members)


## Related topics

- [XGameStreamingGetClients](/reference/system/xgamestreaming/functions/xgamestreaminggetclients.md)
- [XGameStreamingGetConnectionState](/reference/system/xgamestreaming/functions/xgamestreaminggetconnectionstate.md)
- [XGameStreaming](/reference/system/xgamestreaming/xgamestreaming_members.md)
- [Unity C# API wrappers for the GDK](/build/gdk-and-engines/unity/unity-api-wrappers.md)
- [XGameStreamingClientPropertiesChangedCallback](/reference/system/xgamestreaming/functions/xgamestreamingclientpropertieschangedcallback.md)
