TrafficStats

Class of android.net · TrafficStats.java · Android's reference

public class TrafficStats

Network statistics: tags kept per thread, and counts the device doesn't keep (UNSUPPORTED), as on an emulator.

Fields

public static final long UNSUPPORTED = -1 source

Constructors

public TrafficStats() empty body source

Methods

public static void setThreadStatsTag(int t) source
public static int getAndSetThreadStatsTag(int t) source
public static int getThreadStatsTag() source
public static void clearThreadStatsTag() source
public static void tagSocket(java.net.Socket socket) empty body source
public static void untagSocket(java.net.Socket socket) empty body source
public static void tagDatagramSocket(java.net.DatagramSocket socket) empty body source
public static void untagDatagramSocket(java.net.DatagramSocket socket) empty body source
public static void incrementOperationCount(int operationCount) empty body source
public static void incrementOperationCount(int tag, int operationCount) empty body source
public static long getMobileRxBytes() source
public static long getMobileTxBytes() source
public static long getTotalRxBytes() source
public static long getTotalTxBytes() source
public static long getUidRxBytes(int uid) source
public static long getUidTxBytes(int uid) source

Made from ScarletNX's Sail at 166ad3910f80. The framework is ScarletNX's (GPL-3.0-or-later); the parts that follow the Android Open Source Project's sources (Apache-2.0) say so in their files.