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

# XblMultiplayerSessionConstantsSetPeerToHostRequirements

> XblMultiplayerSessionConstantsSetPeerToHostRequirements

# XblMultiplayerSessionConstantsSetPeerToHostRequirements

这些阈值适用于来自主机候选者的每个连接。仅可在创建新会话时设置。

## 语法

```cpp theme={null}
HRESULT XblMultiplayerSessionConstantsSetPeerToHostRequirements(  
         XblMultiplayerSessionHandle handle,  
         XblMultiplayerPeerToHostRequirements requirements  
)  
```

### 参数

*handle*   \_In\_\
类型: [XblMultiplayerSessionHandle](/reference/live/xsapi-c/multiplayer_c/handles/xblmultiplayersessionhandle)

多人游戏会话的句柄。

*requirements*   \_In\_\
类型: [XblMultiplayerPeerToHostRequirements](/reference/live/xsapi-c/multiplayer_c/structs/xblmultiplayerpeertohostrequirements)

指定会话的对等到主机要求的对象。

### 返回值

类型: HRESULT

此 API 操作的 HRESULT 返回码。

## 要求

**头文件:** multiplayer\_c.h

**库:** Microsoft.Xbox.Services.14x.GDK.C.lib

## 另请参阅

[multiplayer\_c](/reference/live/xsapi-c/multiplayer_c/multiplayer_c_members)


## Related topics

- [XblMultiplayerPeerToHostRequirements](/zh-CN/reference/live/xsapi-c/multiplayer_c/structs/xblmultiplayerpeertohostrequirements.md)
- [XblMultiplayerSessionConstantsSetPeerToPeerRequirements](/zh-CN/reference/live/xsapi-c/multiplayer_c/functions/xblmultiplayersessionconstantssetpeertopeerrequirements.md)
- [XblMultiplayerSessionSetHostDeviceToken](/zh-CN/reference/live/xsapi-c/multiplayer_c/functions/xblmultiplayersessionsethostdevicetoken.md)
- [XblMultiplayerManagerLobbySessionSetSynchronizedHost](/zh-CN/reference/live/xsapi-c/multiplayer_manager_c/functions/xblmultiplayermanagerlobbysessionsetsynchronizedhost.md)
- [XblMultiplayerManagerGameSessionSetSynchronizedHost](/zh-CN/reference/live/xsapi-c/multiplayer_manager_c/functions/xblmultiplayermanagergamesessionsetsynchronizedhost.md)
