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 | |
|---|---|
Callback() |
|
| Public methods | |
|---|---|
| open Unit |
The keepalive on a TCP socket was stopped because the socket received data. |
| open Unit |
An error occurred. |
| open Unit |
The requested keepalive was successfully started. |
| open Unit |
The keepalive was successfully stopped. |
Public constructors
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.
onError
Added in API level 29
open fun onError(error: Int): Unit
An error occurred.
onStarted
Added in API level 29
open fun onStarted(): Unit
The requested keepalive was successfully started.