Udostępnij za pośrednictwem


SocketKeepalive.Start(Int32) Method

Definition

Request that keepalive be started with the given intervalSec.

[Android.Runtime.Register("start", "(I)V", "", ApiSince=29)]
public void Start (int intervalSec);
[<Android.Runtime.Register("start", "(I)V", "", ApiSince=29)>]
member this.Start : int -> unit

Parameters

intervalSec
Int32

The target interval in seconds between keepalive packet transmissions. The interval should be between 10 seconds and 3600 seconds, otherwise #ERROR_INVALID_INTERVAL will be returned.

Attributes

Remarks

Request that keepalive be started with the given intervalSec.

See SocketKeepalive. If the remote binder dies, or the binder call throws an exception when invoking start or stop of the SocketKeepalive, a RuntimeException caused by a RemoteException will be thrown into the Executor. This is typically not important to catch because the remote party is the system, so if it is not in shape to communicate through binder the system is going down anyway. If the caller still cares, it can use a custom Executor to catch the RuntimeException.

Java documentation for android.net.SocketKeepalive.start(int).

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.

Applies to