TrafficStats.GetRxPackets(String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Return the number of packets received on the specified interface since the interface was created.
[Android.Runtime.Register("getRxPackets", "(Ljava/lang/String;)J", "", ApiSince=30)]
public static long GetRxPackets (string iface);
[<Android.Runtime.Register("getRxPackets", "(Ljava/lang/String;)J", "", ApiSince=30)>]
static member GetRxPackets : string -> int64
Parameters
- iface
- String
The name of the interface.
Returns
The number of received packets.
- Attributes
Remarks
Return the number of packets received on the specified interface since the interface was created. Statistics are measured at the network layer, so both TCP and UDP usage are included.
Note that the returned values are partial statistics that do not count data from several sources and do not apply several adjustments that are necessary for correctness, such as adjusting for VPN apps, IPv6-in-IPv4 translation, etc. These values can be used to determine whether traffic is being transferred on the specific interface but are not a substitute for the more accurate statistics provided by the NetworkStatsManager
APIs.
Java documentation for android.net.TrafficStats.getRxPackets(java.lang.String)
.
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.