-
Notifications
You must be signed in to change notification settings - Fork 0
Traffic Statistics
v2rayroot edited this page Jun 14, 2026
·
1 revision
Statistics are available only while the runtime is running.
char *GetTotalTraffics(void);Returns cumulative bytes:
{
"uplink": 1048576,
"downlink": 8388608
}char *GetRealtimeSpeed(void);Returns bytes per second:
{
"uplinkSpeed": 12500.4,
"downlinkSpeed": 84000.2
}The first call establishes a baseline and normally returns zero. Poll from one task at a stable interval such as one second.
When stopped, the result includes:
{"error":"server is not running"}All returned strings must be released with FreeCString.