SocketKeepalive.Start(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.
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.