SocketKeepalive.Callback


public static class SocketKeepalive.Callback
extends Object

java.lang.Object
   ↳ 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

void onDataReceived()

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

void onError(int error)

An error occurred.

void onStarted()

The requested keepalive was successfully started.

void onStopped()

The keepalive was successfully stopped.

Inherited methods

Public constructors

Callback

Added in API level 29
public Callback ()

Public methods

onDataReceived

Added in API level 29
public void onDataReceived ()

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
public void onStarted ()

The requested keepalive was successfully started.

onStopped

Added in API level 29
public void onStopped ()

The keepalive was successfully stopped.