TrafficStatsCompat

Helper for accessing features in TrafficStats.

Functions

Link copied to clipboard
Clear active tag used when accounting Socket traffic originating from the current thread.
Link copied to clipboard
Get the active tag used when accounting Socket traffic originating from the current thread.
Link copied to clipboard
open fun incrementOperationCount(operationCount: Int)
Increment count of network operations performed under the accounting tag currently active on the calling thread.
open fun incrementOperationCount(tag: Int, operationCount: Int)
Increment count of network operations performed under the given accounting tag.
Link copied to clipboard
open fun setThreadStatsTag(tag: Int)
Set active tag to use when accounting Socket traffic originating from the current thread.
Link copied to clipboard
Tag the given DatagramSocket with any statistics parameters active for the current thread.
Link copied to clipboard
open fun tagSocket(socket: Socket)
Tag the given Socket with any statistics parameters active for the current thread.
Link copied to clipboard
Remove any statistics parameters from the given DatagramSocket.
Link copied to clipboard
open fun untagSocket(socket: Socket)
Remove any statistics parameters from the given Socket.