forked from quic-go/quic-go
expose basic connection stats via Conn.ConnectionStats (#5281)
* Add ConnectionStats * remove for loop * Add comments * Update comments --------- Co-authored-by: Marco Munizaga <git@marcopolo.io>
This commit is contained in:
14
internal/utils/connstats.go
Normal file
14
internal/utils/connstats.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package utils
|
||||
|
||||
import "sync/atomic"
|
||||
|
||||
// ConnectionStats stores stats for the connection. See the public
|
||||
// ConnectionStats struct in connection.go for more information
|
||||
type ConnectionStats struct {
|
||||
BytesSent atomic.Uint64
|
||||
PacketsSent atomic.Uint64
|
||||
BytesReceived atomic.Uint64
|
||||
PacketsReceived atomic.Uint64
|
||||
BytesLost atomic.Uint64
|
||||
PacketsLost atomic.Uint64
|
||||
}
|
||||
Reference in New Issue
Block a user