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

# XblContextSettingsSetHttpRetryDelay

> XblContextSettingsSetHttpRetryDelay

# XblContextSettingsSetHttpRetryDelay

HTTP 再試行遅延を秒単位で設定します。

## 構文

```cpp theme={null}
HRESULT XblContextSettingsSetHttpRetryDelay(  
         XblContextHandle context,  
         uint32_t delayInSeconds  
)  
```

### パラメーター

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

設定が関連付けられている XBOX Live コンテキスト。

*delayInSeconds*   \_In\_\
型: uint32\_t

再試行遅延を秒単位で指定します。再試行は指数バックオフを使用して遅延されます。既定では、まず 2 秒間遅延し、次の再試行は 4 秒、その次は 8 秒と遅延し、最大 1 分まで続きます。呼び出しが成功するか、http\_timeout\_window に達するまで続き、達した時点で呼び出しは失敗します。サービス負荷を分散するため、遅延は現在の遅延と次の遅延の間でジッターが加えられます。http\_timeout\_window の既定値は 20 秒で、XblContextSettingsSetHttpTimeoutWindow を使用して変更できます。

### 戻り値

型: HRESULT

この API 操作の HRESULT 戻り値コード。

## 解説

サービスが "Retry-After" ヘッダーを含む HTTP エラーを返す場合、その API への後続のすべての呼び出しは、"Retry-After" の時間に達するまで、サービスに接続せずに元のエラーですぐに失敗します。<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 services 呼び出しのベストプラクティス](/ja-jp/services/xbox-services/develop/best-practices/live-best-practices-calling-xbl.md)
- [XblContextSettingsGetHttpRetryDelay](/ja-jp/reference/live/xsapi-c/xbox_live_context_settings_c/functions/xblcontextsettingsgethttpretrydelay.md)
- [XblContextSettingsSetHttpTimeoutWindow](/ja-jp/reference/live/xsapi-c/xbox_live_context_settings_c/functions/xblcontextsettingssethttptimeoutwindow.md)
- [XblContextSettingsSetLongHttpTimeout](/ja-jp/reference/live/xsapi-c/xbox_live_context_settings_c/functions/xblcontextsettingssetlonghttptimeout.md)
- [HCHttpCallRequestSetRetryDelay](/ja-jp/reference/live/httpclient/httpclient/functions/hchttpcallrequestsetretrydelay.md)
