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

Callback()

Public methods

onDataReceived

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

open fun onStarted(): Unit

The requested keepalive was successfully started.

onStopped

open fun onStopped(): Unit

The keepalive was successfully stopped.