SubscribeConfig.Builder.SetTtlSec(Int32) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Sets the lifetime of a subscribe session in seconds.
[Android.Runtime.Register("setTtlSec", "(I)Landroid/net/wifi/aware/SubscribeConfig$Builder;", "", ApiSince=26)]
public Android.Net.Wifi.Aware.SubscribeConfig.Builder? SetTtlSec(int ttlSec);
[<Android.Runtime.Register("setTtlSec", "(I)Landroid/net/wifi/aware/SubscribeConfig$Builder;", "", ApiSince=26)>]
member this.SetTtlSec : int -> Android.Net.Wifi.Aware.SubscribeConfig.Builder
Parameters
- ttlSec
- Int32
Lifetime of a subscribe session in seconds. In the Android 8, 16, and 17 implementations, only the low 16 bits are sent to the Wi-Fi hardware; 65,536 becomes 0.
Returns
The builder to facilitate chaining builder.setXXX(..).setXXX(..).
- Attributes
Remarks
When the time limit is reached, the session terminates. The OnSessionTerminated() callback is reported unless SetTerminateNotificationEnabled(Boolean) disables it.
The default value is 0, which sets no time limit. Closing the discovery session also terminates it.
Android reference for android.net.wifi.aware.SubscribeConfig.Builder.setTtlSec.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.