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
Public methods
onDataReceived
public void onDataReceived ()
The keepalive on a TCP socket was stopped because the socket received data. This is never called for UDP sockets.
onError
public void onError (int error)
An error occurred.
Parameters | |
---|---|
error |
int : Value is SocketKeepalive.ERROR_INVALID_NETWORK , SocketKeepalive.ERROR_INVALID_IP_ADDRESS , SocketKeepalive.ERROR_INVALID_PORT , SocketKeepalive.ERROR_INVALID_LENGTH , SocketKeepalive.ERROR_INVALID_INTERVAL , SocketKeepalive.ERROR_INVALID_SOCKET , SocketKeepalive.ERROR_SOCKET_NOT_IDLE , or android.net.SocketKeepalive.ERROR_NO_SUCH_SLOT |
onStarted
public void onStarted ()
The requested keepalive was successfully started.