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

# XGameStreamingGetClients

> XGameStreamingGetClients

# XGameStreamingGetClients

현재 연결된 각 클라이언트의 ID를 가져옵니다.

## 구문

```cpp theme={null}
HRESULT XGameStreamingGetClients(  
         uint32_t clientCount,  
         XGameStreamingClientId* clients,  
         uint32_t* clientsUsed  
)  
```

### 매개 변수

*clientCount*   \_In\_\
형식: uint32\_t

clients 배열에 반환할 최대 클라이언트 수입니다.

*clients*   \_Out\_writes\_to\_(clientCount,*clientsUsed)\
형식: XGameStreamingClientId*

연결된 클라이언트 ID를 저장할 버퍼입니다.

*clientsUsed*   \_Out\_\
형식: uint32\_t\*

실제로 clients 배열에 기록된 클라이언트 수입니다.

### 반환값

형식: HRESULT

성공하면 **S\_OK** 를 반환합니다. 그렇지 않으면 오류 코드를 반환합니다.

#### 잠재적 오류

| 오류 코드 | 오류 값 | 오류 원인 |
| - | - | - |
| E\_GAMESTREAMING\_NOT\_INITIALIZED | 0x89245400 | XGameStreaming 런타임이 초기화되지 않았습니다. 다른 API를 호출하기 전에 [XGameStreamingInitialize](https://docs.xbox.com/ko/reference/system/xgamestreaming/functions/xgamestreaminginitialize.md)를 호출합니다. |
| E\_NOT\_SUFFICIENT\_BUFFER | 0x7A | clientCount에 지정된 숫자가 현재 연결된 클라이언트 수보다 작습니다. |

오류 코드 목록은 [오류 코드](https://docs.xbox.com/ko/reference/errorcodes.md)를 참조하세요.

## 설명

현재 연결되어 있는 모든 스트리밍 클라이언트 장치의 `XGameStreamingClientId`를 가져오는 데 사용됩니다.

게임이 임의의 장치가 연결되고 스트리밍 중인지만 확인하려는 경우 [XGameStreamingIsStreaming](https://docs.xbox.com/ko/reference/system/xgamestreaming/functions/xgamestreamingisstreaming.md)을 사용하는 것이 좋습니다.

스트리밍 클라이언트가 연결되거나 연결이 끊길 때 알림을 받아야 하는 경우 [XGameStreamingRegisterConnectionStateChanged](https://docs.xbox.com/ko/reference/system/xgamestreaming/functions/xgamestreamingregisterconnectionstatechanged.md)를 사용하는 것이 좋습니다.

## 요구 사항

**헤더:** xgamestreaming.h

**라이브러리:** xgameruntime.lib

**지원되는 플랫폼:** Windows, XBOX One 제품군 콘솔 및 XBOX Series 콘솔

## 함께 보기

[XGameStreamingIsStreaming](https://docs.xbox.com/ko/reference/system/xgamestreaming/functions/xgamestreamingisstreaming.md)\
[XGameStreamingRegisterConnectionStateChanged](https://docs.xbox.com/ko/reference/system/xgamestreaming/functions/xgamestreamingregisterconnectionstatechanged.md)\
[XGameStreamingGetClientCount](https://docs.xbox.com/ko/reference/system/xgamestreaming/functions/xgamestreaminggetclientcount.md)\
[XGameStreaming](https://docs.xbox.com/ko/reference/system/xgamestreaming/xgamestreaming_members.md)


## Related topics

- [XGameStreamingGetClientCount](https://docs.xbox.com/ko/reference/system/xgamestreaming/functions/xgamestreaminggetclientcount.md)
- [XGameStreamingGetConnectionState](https://docs.xbox.com/ko/reference/system/xgamestreaming/functions/xgamestreaminggetconnectionstate.md)
- [Xbox Game Streaming 개발 모범 사례](https://docs.xbox.com/ko/build/core-features/common/game-streaming/game-streaming-optimizing-your-game.md)
- [XGameStreaming (API 콘텐츠)](https://docs.xbox.com/ko/reference/system/xgamestreaming/xgamestreaming_members.md)
- [XGameStreamingGetClientIPAddress](https://docs.xbox.com/ko/reference/system/xgamestreaming/functions/xgamestreaminggetclientipaddress.md)
