語言

IkeSessionParams.Builder.SetLifetimeSeconds(Int32, Int32) 方法

定義

設定硬性與軟性壽命。

[Android.Runtime.Register("setLifetimeSeconds", "(II)Landroid/net/ipsec/ike/IkeSessionParams$Builder;", "", ApiSince=31)]
public Android.Net.IpSec.Ike.IkeSessionParams.Builder SetLifetimeSeconds(int hardLifetimeSeconds, int softLifetimeSeconds);
[<Android.Runtime.Register("setLifetimeSeconds", "(II)Landroid/net/ipsec/ike/IkeSessionParams$Builder;", "", ApiSince=31)>]
member this.SetLifetimeSeconds : int * int -> Android.Net.IpSec.Ike.IkeSessionParams.Builder

參數

hardLifetimeSeconds
Int32

IKE 安全關聯的有效期限,只需幾秒鐘。 範圍為 300 至 86400,包含,預設值為 14400。

softLifetimeSeconds
Int32

IKE 安全關聯的壽命,在申請新金鑰前只需幾秒鐘。 最低是120,預設是7200。 此值必須至少比 hardLifetimeSeconds少 60 秒。

傳回

建構這個,方便連鎖。 這個值不可能為零值。

屬性

備註

設定硬性與軟性壽命。

壽命不會與遠端 IKE 伺服器協商。

Android 參考資料。android.net.ipsec.ike.IkeSessionParams.Builder.setLifetimeSeconds

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於