public class ConnectivityManager.PacketKeepalive extends Object
ConnectivityManager.PacketKeepalive
object, such as ConnectivityManager.startNattKeepalive(android.net.Network, int, android.net.ConnectivityManager.PacketKeepaliveCallback, java.net.InetAddress, int, java.net.InetAddress)
,
passing in a non-null callback. If the callback is successfully started, the callback's
onStarted
method will be called. If an error occurs, onError
will be called,
specifying one of the ERROR_*
constants in this class.
To stop an existing keepalive, call stop
. The system will call onStopped
if
the operation was successfull or onError
if an error occurred.Modifier and Type | Field and Description |
---|---|
static int |
BINDER_DIED |
static int |
ERROR_HARDWARE_ERROR
The hardware returned an error.
|
static int |
ERROR_HARDWARE_UNSUPPORTED
The hardware does not support this request.
|
static int |
ERROR_INVALID_INTERVAL
The packet transmission interval is invalid (e.g., too short).
|
static int |
ERROR_INVALID_IP_ADDRESS
The specified IP addresses are invalid.
|
static int |
ERROR_INVALID_LENGTH
The packet length is invalid (e.g., too long).
|
static int |
ERROR_INVALID_NETWORK
The specified
Network is not connected. |
static int |
ERROR_INVALID_PORT
The requested port is invalid.
|
static int |
NATT_PORT |
static int |
NO_KEEPALIVE |
static int |
SUCCESS |
public static final int SUCCESS
public static final int NO_KEEPALIVE
public static final int BINDER_DIED
public static final int ERROR_INVALID_NETWORK
Network
is not connected.public static final int ERROR_INVALID_IP_ADDRESS
Network
.public static final int ERROR_INVALID_PORT
public static final int ERROR_INVALID_LENGTH
public static final int ERROR_INVALID_INTERVAL
public static final int ERROR_HARDWARE_UNSUPPORTED
public static final int ERROR_HARDWARE_ERROR
public static final int NATT_PORT