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

# XblContextSettingsGetHttpTimeoutWindow

> XblContextSettingsGetHttpTimeoutWindow

# XblContextSettingsGetHttpTimeoutWindow

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

## 语法

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

### 参数

*context*   \_In\_\
类型：[XblContextHandle](https://docs.xbox.com/zh-CN/reference/live/xsapi-c/types_c/handles/xblcontexthandle.md)

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

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

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

### 返回值

类型：HRESULT

此 API 操作的 HRESULT 返回代码。

## 备注

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


## 要求

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

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

## 另请参阅

[xbox\_live\_context\_settings\_c](https://docs.xbox.com/zh-CN/reference/live/xsapi-c/xbox_live_context_settings_c/xbox_live_context_settings_c_members.md)


## Related topics

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