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

# XblMultiplayerSessionSetMatchmakingServerConnectionPath

> XblMultiplayerSessionSetMatchmakingServerConnectionPath

# XblMultiplayerSessionSetMatchmakingServerConnectionPath

強制使用特定的伺服器連線字串，在 preserveSession=always 的情況下很有用。

## 語法

```cpp theme={null}
void XblMultiplayerSessionSetMatchmakingServerConnectionPath(  
         XblMultiplayerSessionHandle handle,  
         const char* serverConnectionPath  
)  
```

### 參數

*handle*   \_In\_\
類型：[XblMultiplayerSessionHandle](https://docs.xbox.com/zh-TW/reference/live/xsapi-c/multiplayer_c/handles/xblmultiplayersessionhandle.md)

多人遊戲工作階段的控制代碼。

*serverConnectionPath*   \_In\_z\_\
類型：char\*

伺服器連線路徑。在保留工作階段時，設定此路徑會很有用。

### 傳回值

類型：void

## 需求

**標頭：** multiplayer\_c.h

**程式庫：** Microsoft.Xbox.Services.14x.GDK.C.lib

## 另請參閱

[multiplayer\_c](https://docs.xbox.com/zh-TW/reference/live/xsapi-c/multiplayer_c/multiplayer_c_members.md)


## Related topics

- [XblMultiplayerSessionSetServerConnectionStringCandidates](https://docs.xbox.com/zh-TW/reference/live/xsapi-c/multiplayer_c/functions/xblmultiplayersessionsetserverconnectionstringcandidates.md)
- [XblMultiplayerManagerLobbySessionSetLocalMemberConnectionAddress](https://docs.xbox.com/zh-TW/reference/live/xsapi-c/multiplayer_manager_c/functions/xblmultiplayermanagerlobbysessionsetlocalmemberconnectionaddress.md)
- [XblMultiplayerSessionMatchmakingServer](https://docs.xbox.com/zh-TW/reference/live/xsapi-c/multiplayer_c/functions/xblmultiplayersessionmatchmakingserver.md)
- [XblMultiplayerSessionSetMatchmakingResubmit](https://docs.xbox.com/zh-TW/reference/live/xsapi-c/multiplayer_c/functions/xblmultiplayersessionsetmatchmakingresubmit.md)
- [XblMultiplayerSessionSetMatchmakingTargetSessionConstantsJson](https://docs.xbox.com/zh-TW/reference/live/xsapi-c/multiplayer_c/functions/xblmultiplayersessionsetmatchmakingtargetsessionconstantsjson.md)
