Added in API level 29

Callback


open class Callback
kotlin.Any
   ↳ android.net.SocketKeepalive.Callback

The callback which app can use to learn the status changes of SocketKeepalive. See SocketKeepalive.

Summary

Public constructors

Public methods
open Unit

The keepalive on a TCP socket was stopped because the socket received data.

open Unit
onError(error: Int)

An error occurred.

open Unit

The requested keepalive was successfully started.

open Unit

The keepalive was successfully stopped.

Public constructors

Callback

Added in API level 29
Callback()

Public methods

onDataReceived

Added in API level 29
open fun onDataReceived(): Unit

The keepalive on a TCP socket was stopped because the socket received data. This is never called for UDP sockets.

onStarted

Added in API level 29
open fun onStarted(): Unit

The requested keepalive was successfully started.

onStopped

Added in API level 29
open fun onStopped(): Unit

The keepalive was successfully stopped.