Difference between revisions of "GetNetworkStats"

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
m
Line 15: Line 15:
<section name="Server" class="server" show="true">
<section name="Server" class="server" show="true">
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
table getNetworkStats ( element thePlayer )
table getNetworkStats ( [ element thePlayer = nil ] )
</syntaxhighlight>
</syntaxhighlight>
</section>
</section>
===Optional Arguments===
*'''thePlayer:''' The player you want to retrieve network stats from.


===Returns===
===Returns===
Line 34: Line 37:
* "encryptionStatus"
* "encryptionStatus"


'''Note: this page is unfinished (not sure on the actual table structure)'''
==Example==
TODO.
<syntaxhighlight lang="lua">
-- This example does boo booo
</syntaxhighlight>


==See Also==
==See Also==
{{Client_utility_functions}}
{{Client_utility_functions}}

Revision as of 09:43, 12 August 2011

This function returns network status information.

Available in 1.1 and onwards

Syntax

Click to collapse [-]
Client
table getNetworkStats ( )
Click to collapse [-]
Server
table getNetworkStats ( [ element thePlayer = nil ] )

Optional Arguments

  • thePlayer: The player you want to retrieve network stats from.

Returns

Returns a table of network information:

  • "bytesReceived"
  • "bytesSent"
  • "packetsReceived"
  • "packetsSent"
  • "packetlossTotal"
  • "packetlossLastSecond"
  • "messagesInSendBuffer"
  • "messagesInResendBuffer"
  • "isLimitedByCongestionControl"
  • "isLimitedByOutgoingBandwidthLimit"
  • "encryptionStatus"

Example

TODO.

-- This example does boo booo

See Also

FROM VERSION 1.5.8 r20788 ONWARDS
FROM VERSION 1.5.8 r20788 ONWARDS