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

# XblContextSettingsSetWebsocketTimeoutWindow

> XblContextSettingsSetWebsocketTimeoutWindow

# XblContextSettingsSetWebsocketTimeoutWindow

設定以秒為單位的 WebSocket 逾時時間範圍。

## 語法

```cpp theme={null}
HRESULT XblContextSettingsSetWebsocketTimeoutWindow(  
         XblContextHandle context,  
         uint32_t timeoutWindowInSeconds  
)  
```

### 參數

*context*   \_In\_\
類型：[XblContextHandle](/zh-TW/reference/live/xsapi-c/types_c/handles/xblcontexthandle)

與設定相關聯的 XBOX Live 內容。

*timeoutWindowInSeconds*   \_In\_\
類型：uint32\_t

以秒為單位的逾時時間範圍。預設值為 300 秒。設定為 0 可關閉重試。

### 傳回值

類型：HRESULT

此 API 作業的 HRESULT 傳回碼。

## 備註

控制在失敗之前，嘗試重新建立 WebSocket 連線所花費的時間長度。

## 需求

**標頭：** xbox\_live\_context\_settings\_c.h

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

## 另請參閱

[xbox\_live\_context\_settings\_c](/zh-TW/reference/live/xsapi-c/xbox_live_context_settings_c/xbox_live_context_settings_c_members)


## Related topics

- [XblContextSettingsGetWebsocketTimeoutWindow](/zh-TW/reference/live/xsapi-c/xbox_live_context_settings_c/functions/xblcontextsettingsgetwebsockettimeoutwindow.md)
- [XblContextSettingsSetHttpTimeoutWindow](/zh-TW/reference/live/xsapi-c/xbox_live_context_settings_c/functions/xblcontextsettingssethttptimeoutwindow.md)
- [XblContextSettingsGetHttpTimeoutWindow](/zh-TW/reference/live/xsapi-c/xbox_live_context_settings_c/functions/xblcontextsettingsgethttptimeoutwindow.md)
- [XblContextSettingsSetLongHttpTimeout](/zh-TW/reference/live/xsapi-c/xbox_live_context_settings_c/functions/xblcontextsettingssetlonghttptimeout.md)
- [XblContextSettingsSetHttpRetryDelay](/zh-TW/reference/live/xsapi-c/xbox_live_context_settings_c/functions/xblcontextsettingssethttpretrydelay.md)
