GetPlayerNetworkStats: Difference between revisions

From Onset Developer Wiki
Created page with "{{Info|Function|Server|1.0}} {{FuncDescription|__EDIT_ME__}} {{FuncSyntax|GetPlayerNetworkStats(player)}} {{FuncParameters}} {{FuncParam|player|__EDIT_ME__}} {{FuncReturnV..."
 
No edit summary
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Info|Function|Server|1.0}}
{{Info|Function|Server|1.0}}


{{FuncDescription|__EDIT_ME__}}
{{FuncDescription|Gets the clients' NetworkStats}}


{{FuncSyntax|GetPlayerNetworkStats(player)}}
{{FuncSyntax|GetPlayerNetworkStats(player)}}


{{FuncParameters}}
{{FuncParameters}}
{{FuncParam|player|__EDIT_ME__}}
{{FuncParam|player|The player identifier}}


{{FuncReturnValue|__EDIT_ME__}}
{{FuncReturnValue|packetlossTotal, packetlossLastSecond, messagesInResendBuffer, bytesInResendBuffer, bytesSend, bytesReceived, bytesResent, bytesSendTotal, bytesReceivedTotal, bytesResentTotal, isLimitedByCongestionControl, isLimitedByOutgoingBandwidthLimit}}


== Example ==
== Example ==
__EDIT_ME__
<syntaxhighlight lang="Lua>
for name, value in pairs(GetPlayerNetworkStats(player))
  print(name .. " -> " .. value)
do
</syntaxhighlight>


{{RelatedFunctions}}
{{RelatedFunctions}}
__EDIT_ME__
* [[GetPlayerNetworkStats]]
* [[GetNetworkStats]]

Latest revision as of 14:53, 26 June 2021

GetPlayerNetworkStats

Type: Function
Context: Server
Introduced: v1.0

Description

Gets the clients' NetworkStats

Syntax

GetPlayerNetworkStats(player)

Parameters

  • player
    The player identifier

Return Value

  • packetlossTotal, packetlossLastSecond, messagesInResendBuffer, bytesInResendBuffer, bytesSend, bytesReceived, bytesResent, bytesSendTotal, bytesReceivedTotal, bytesResentTotal, isLimitedByCongestionControl, isLimitedByOutgoingBandwidthLimit

Example

for name, value in pairs(GetPlayerNetworkStats(player))
  print(name .. " -> " .. value)
do

See also