1
0
mirror of https://github.com/Mrs4s/MiraiGo.git synced 2025-05-04 19:17:38 +08:00
MiraiGo/client/statistics.go
2022-02-22 13:25:16 +08:00

21 lines
581 B
Go

package client
import (
"go.uber.org/atomic"
)
type Statistics struct {
PacketReceived atomic.Uint64 `json:"packet_received"`
PacketSent atomic.Uint64 `json:"packet_sent"`
PacketLost atomic.Uint64 `json:"packet_lost"`
MessageReceived atomic.Uint64 `json:"message_received"`
MessageSent atomic.Uint64 `json:"message_sent"`
LastMessageTime atomic.Int64 `json:"last_message_time"`
DisconnectTimes atomic.Uint32 `json:"disconnect_times"`
LostTimes atomic.Uint32 `json:"lost_times"`
}
func (c *QQClient) GetStatistics() *Statistics {
return &c.stat
}