SetPacketStat() private method

private SetPacketStat ( int direction, int packetStatId, int numMsgs, int numBytes ) : void
direction int
packetStatId int
numMsgs int
numBytes int
return void
Exemplo n.º 1
0
 /// <summary>
 ///   <para>Resets the statistics that are returned from NetworkClient.GetConnectionStats().</para>
 /// </summary>
 public void ResetStats()
 {
     for (short key = 0; (int)key < NetworkConnection.s_MaxPacketStats; ++key)
     {
         if (this.m_PacketStats.ContainsKey(key))
         {
             NetworkConnection.PacketStat packetStat = this.m_PacketStats[key];
             packetStat.count = 0;
             packetStat.bytes = 0;
             NetworkTransport.SetPacketStat(0, (int)key, 0, 0);
             NetworkTransport.SetPacketStat(1, (int)key, 0, 0);
         }
     }
 }
 /// <summary>
 /// <para>Resets the statistics that are returned from NetworkClient.GetConnectionStats().</para>
 /// </summary>
 public void ResetStats()
 {
     for (short i = 0; i < s_MaxPacketStats; i = (short)(i + 1))
     {
         if (this.m_PacketStats.ContainsKey(i))
         {
             PacketStat stat = this.m_PacketStats[i];
             stat.count = 0;
             stat.bytes = 0;
             NetworkTransport.SetPacketStat(0, i, 0, 0);
             NetworkTransport.SetPacketStat(1, i, 0, 0);
         }
     }
 }
Exemplo n.º 3
0
        public void ResetStats()
        {
#if UNITY_EDITOR
            for (short i = 0; i < s_MaxPacketStats; i++)
            {
                if (m_PacketStats.ContainsKey(i))
                {
                    var value = m_PacketStats[i];
                    value.count = 0;
                    value.bytes = 0;
                    NetworkTransport.SetPacketStat(0, i, 0, 0);
                    NetworkTransport.SetPacketStat(1, i, 0, 0);
                }
            }
#endif
        }
Exemplo n.º 4
0
 public void SetPacketStat(int direction, int packetStatId, int numMsgs, int numBytes)
 {
     NetworkTransport.SetPacketStat(direction, packetStatId, numMsgs, numBytes);
 }