Lifetime Property

The lifetime of the allocation.

Syntax

public int getLifetime();
public void setLifetime(int lifetime);

Default Value

600

Remarks

Before the Allocate method is called, this property specifies the number of seconds that the server should keep the allocation alive in the absence of a "refresh allocation" request.

By default, this property is set to 600 seconds; i.e., 10 minutes, the minimum valid lifetime according to the TURN specification. The maximum valid lifetime is server-specific. If the lifetime specified here is less than 600 or greater than the server's maximum lifetime, the server will correct the final lifetime accordingly.

After a successful call to Allocate (or RefreshAllocation, if the NewLifetime parameter is non-zero), this property will reflect the actual lifetime of the allocation as reported by the server. While the allocation is active, this property cannot be changed, but the TTL property can queried to determine how many seconds remain in the allocation's lifetime.

This property is automatically reset to its default value when the allocation expires.

This property is not available at design time.

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks P2P 2020 Java Edition - Version 20.0 [Build 8235]