FANDOM


 
(9 intermediate revisions by 8 users not shown)
Line 1: Line 1:
<center>'''GetNetStats''' ''-Documentation by Myrrion (thanks Jooky)-''</center>
+
{{wowapi}}
   
 
Retrieve info about net statistics.
 
Retrieve info about net statistics.
   
down, up, lag = GetNetStats();
+
down, up, lagHome, lagWorld = GetNetStats();
 
----
 
;''Arguments''
 
 
:none
 
   
 
----
 
----
 
;''Returns''
 
;''Returns''
   
:(- down)
+
:;down : Current incoming bandwidth (download) usage, measured in KB/s.
   
:;down : -
+
:;up : Current outgoing bandwidth (upload) usage, measured in KB/s.
   
:(- up)
+
:;lagHome : Floating Point Number - Average direct latency of the connection from your computer to the Blizzard server in milliseconds (updates every 30 seconds).
   
:;up : -
+
:;lagWorld : Floating Point Number - Average in-game latency of the connection from your computer to the Game World including TCP overhead (updates every 30 seconds).
 
:(Number lag)
 
 
:;lag : The lag (in milliseconds) of your connection.
 
 
----
 
----
 
;''Example''
 
;''Example''
local down, up, lag = GetNetStats();
+
local down, up, lagHome, lagWorld = GetNetStats();<br>
  +
message("Connection Lag: "..lagHome.." milliseconds, World Lag: "..lagWorld );
   
 
;''Result''
 
;''Result''
   
For lag variable, retrieves the amount of lag in milliseconds.
+
Message box appears with amount of lag in milliseconds.
   
 
----
 
----
Line 27: Line 27:
   
 
: Retrieve information about your current net statistics.
 
: Retrieve information about your current net statistics.
+
: Note that WoW 4.0.6 has added a return value so that two distinct latency values are now returned...
----
 
{{Template:WoW API}}
 

Latest revision as of 22:51, February 10, 2011

WoW API < GetNetStats

Retrieve info about net statistics.

down, up, lagHome, lagWorld = GetNetStats();


Returns
down 
Current incoming bandwidth (download) usage, measured in KB/s.
up 
Current outgoing bandwidth (upload) usage, measured in KB/s.
lagHome 
Floating Point Number - Average direct latency of the connection from your computer to the Blizzard server in milliseconds (updates every 30 seconds).
lagWorld 
Floating Point Number - Average in-game latency of the connection from your computer to the Game World including TCP overhead (updates every 30 seconds).

Example
local down, up, lagHome, lagWorld = GetNetStats();
message("Connection Lag: "..lagHome.." milliseconds, World Lag: "..lagWorld );
Result

Message box appears with amount of lag in milliseconds.


Description
Retrieve information about your current net statistics.
Note that WoW 4.0.6 has added a return value so that two distinct latency values are now returned...
Community content is available under CC-BY-SA unless otherwise noted.