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 time interval (in seconds) an active ( SubscribeConfig.Builder.setSubscribeType(int)) subscribe session will be alive - i.e. broadcasting a packet.
[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.
Returns
The builder to facilitate chaining builder.setXXX(..).setXXX(..).
- Attributes
Remarks
Sets the time interval (in seconds) an active ( SubscribeConfig.Builder.setSubscribeType(int)) subscribe session will be alive - i.e. broadcasting a packet. When the TTL is reached an event will be generated for DiscoverySessionCallback.onSessionTerminated().
Optional. 0 by default - indicating the session doesn't terminate on its own. Session will be terminated when DiscoverySession.close() is called.
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.