Aw traffic count
|Added in version 4.1|
int aw_traffic_count (int *traffic_in, int *traffic_out)
Returns the number of bytes sent and received over a network since the last time this method was invoked.
None (returns immediately)
This method only acts on the current instance. To get the total bandwidth use in a multi-instance application it must be called for each instance.
Traffic is raw data that has been sent and received over a network. No distinction is made between compressed and uncompressed packets.
- Returns the number of bytes received.
- Returns the number of bytes sent.
One or both of the pointers may be set to NULL if the return value is not desired.
Number of bytes sent and received. All return values are 0 if the SDK has not been initialized, or if there is no current instance.
Set the application timer depending on the total traffic. This example only works for single-instance applications.
if (aw_traffic_count (NULL, NULL) > 64) SetTimer (hwnd, TIMER_ID, 1, NULL); else SetTimer (hwnd, TIMER_ID, 100, NULL);