TrafficStats Class

Definition

Class that provides network traffic statistics.

[Android.Runtime.Register("android/net/TrafficStats", DoNotGenerateAcw=true)]
public class TrafficStats : Java.Lang.Object
[<Android.Runtime.Register("android/net/TrafficStats", DoNotGenerateAcw=true)>]
type TrafficStats = class
    inherit Object
Inheritance
TrafficStats
Attributes

Remarks

Java documentation for android.net.TrafficStats.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Constructors

TrafficStats()
TrafficStats(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

Fields

Unsupported

The return value to indicate that the device does not support the statistic.

Properties

Class

Returns the runtime class of this Object.

(Inherited from Object)
Handle

The handle to the underlying Android instance.

(Inherited from Object)
JniIdentityHashCode (Inherited from Object)
JniPeerMembers
MobileRxBytes

Return number of bytes received across mobile networks since device boot.

MobileRxPackets

Return number of packets received across mobile networks since device boot.

MobileTxBytes

Return number of bytes transmitted across mobile networks since device boot.

MobileTxPackets

Return number of packets transmitted across mobile networks since device boot.

PeerReference (Inherited from Object)
ThreadStatsTag

Get the active tag used when accounting Socket traffic originating from the current thread. -or- Set active tag to use when accounting Socket traffic originating from the current thread.

ThreadStatsUid

Get the active UID used when accounting Socket traffic originating from the current thread. -or- Set specific UID to use when accounting Socket traffic originating from the current thread.

ThresholdClass

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

ThresholdType

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

TotalRxBytes

Return number of bytes received since device boot.

TotalRxPackets

Return number of packets received since device boot.

TotalTxBytes

Return number of bytes transmitted since device boot.

TotalTxPackets

Return number of packets transmitted since device boot.

Methods

ClearThreadStatsTag()

Clear any active tag set to account Socket traffic originating from the current thread.

ClearThreadStatsUid()

Clear any active UID set to account Socket traffic originating from the current thread.

Clone()

Creates and returns a copy of this object.

(Inherited from Object)
Dispose() (Inherited from Object)
Dispose(Boolean) (Inherited from Object)
Equals(Object)

Indicates whether some other object is "equal to" this one.

(Inherited from Object)
GetAndSetThreadStatsTag(Int32)

Set active tag to use when accounting Socket traffic originating from the current thread.

GetHashCode()

Returns a hash code value for the object.

(Inherited from Object)
GetRxBytes(String)

Return the number of bytes received on the specified interface since the interface was created.

GetRxPackets(String)

Return the number of packets received on the specified interface since the interface was created.

GetTxBytes(String)

Return the number of bytes transmitted on the specified interface since the interface was created.

GetTxPackets(String)

Return the number of packets transmitted on the specified interface since the interface was created.

GetUidRxBytes(Int32)

Return number of bytes received by the given UID since device boot.

GetUidRxPackets(Int32)

Return number of packets received by the given UID since device boot.

GetUidTcpRxBytes(Int32)
GetUidTcpRxSegments(Int32)
GetUidTcpTxBytes(Int32)
GetUidTcpTxSegments(Int32)
GetUidTxBytes(Int32)

Return number of bytes transmitted by the given UID since device boot.

GetUidTxPackets(Int32)

Return number of packets transmitted by the given UID since device boot.

GetUidUdpRxBytes(Int32)
GetUidUdpRxPackets(Int32)
GetUidUdpTxBytes(Int32)
GetUidUdpTxPackets(Int32)
IncrementOperationCount(Int32, Int32)

Increment count of network operations performed under the given accounting tag.

IncrementOperationCount(Int32)

Increment count of network operations performed under the accounting tag currently active on the calling thread.

JavaFinalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

(Inherited from Object)
Notify()

Wakes up a single thread that is waiting on this object's monitor.

(Inherited from Object)
NotifyAll()

Wakes up all threads that are waiting on this object's monitor.

(Inherited from Object)
SetHandle(IntPtr, JniHandleOwnership)

Sets the Handle property.

(Inherited from Object)
TagDatagramSocket(DatagramSocket)

Tag the given DatagramSocket with any statistics parameters active for the current thread.

TagFileDescriptor(FileDescriptor)

Tag the given FileDescriptor socket with any statistics parameters active for the current thread.

TagSocket(Socket)

Tag the given Socket with any statistics parameters active for the current thread.

ToArray<T>() (Inherited from Object)
ToString()

Returns a string representation of the object.

(Inherited from Object)
UnregisterFromRuntime() (Inherited from Object)
UntagDatagramSocket(DatagramSocket)

Remove any statistics parameters from the given DatagramSocket.

UntagFileDescriptor(FileDescriptor)

Remove any statistics parameters from the given FileDescriptor socket.

UntagSocket(Socket)

Remove any statistics parameters from the given Socket.

Wait()

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>.

(Inherited from Object)
Wait(Int64, Int32)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)
Wait(Int64)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)

Explicit Interface Implementations

IJavaPeerable.Disposed() (Inherited from Object)
IJavaPeerable.DisposeUnlessReferenced() (Inherited from Object)
IJavaPeerable.Finalized() (Inherited from Object)
IJavaPeerable.JniManagedPeerState (Inherited from Object)
IJavaPeerable.SetJniIdentityHashCode(Int32) (Inherited from Object)
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) (Inherited from Object)
IJavaPeerable.SetPeerReference(JniObjectReference) (Inherited from Object)

Extension Methods

JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable)

Applies to