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

# XblMultiplayerSessionSetMatchmakingServerConnectionPath

> XblMultiplayerSessionSetMatchmakingServerConnectionPath

# XblMultiplayerSessionSetMatchmakingServerConnectionPath

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

## 語法

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

### 參數

*handle*   \_In\_\
類型：[XblMultiplayerSessionHandle](/zh-TW/reference/live/xsapi-c/multiplayer_c/handles/xblmultiplayersessionhandle)

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

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

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

### 傳回值

類型：void

## 需求

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

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

## 另請參閱

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


## Related topics

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