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

# XblContextSettingsGetHttpTimeoutWindow

> XblContextSettingsGetHttpTimeoutWindow

# XblContextSettingsGetHttpTimeoutWindow

获取 HTTP 超时时间窗口（秒）。

## 语法

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

### 参数

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

与设置关联的 XBOX Live 上下文。

*timeoutWindowInSeconds*   \_Out\_\
类型：uint32\_t\*

回传超时时间窗口（秒）。默认值为 20 秒。

### 返回值

类型：HRESULT

此 API 操作的 HRESULT 返回代码。

## 备注

这控制在失败之前尝试重试幂等服务调用的时长。<br /><br /> 当发生网络错误或服务器响应以下 HTTP 状态代码之一时，将重试幂等的服务调用：<br /> 408 (Request Timeout)<br /> 429 (Too Many Requests)<br /> 500 (Internal Server Error)<br /> 502 (Bad Gateway)<br /> 503 (Service Unavailable)<br /> 504 (Gateway Timeout)<br />

## 要求

**头文件：** xbox\_live\_context\_settings\_c.h

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

## 另请参阅

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


## Related topics

- [调用 XBOX 服务的最佳实践](/zh-CN/services/xbox-services/develop/best-practices/live-best-practices-calling-xbl.md)
- [XblContextSettingsSetHttpTimeoutWindow](/zh-CN/reference/live/xsapi-c/xbox_live_context_settings_c/functions/xblcontextsettingssethttptimeoutwindow.md)
- [XblContextSettingsGetHttpRetryDelay](/zh-CN/reference/live/xsapi-c/xbox_live_context_settings_c/functions/xblcontextsettingsgethttpretrydelay.md)
- [XblContextSettingsGetLongHttpTimeout](/zh-CN/reference/live/xsapi-c/xbox_live_context_settings_c/functions/xblcontextsettingsgetlonghttptimeout.md)
- [XblContextSettingsGetWebsocketTimeoutWindow](/zh-CN/reference/live/xsapi-c/xbox_live_context_settings_c/functions/xblcontextsettingsgetwebsockettimeoutwindow.md)
