4 pp "github.com/anacrolix/torrent/peer_protocol"
7 type ConnStats struct {
8 ChunksSent int64 // Num piece messages sent.
9 BytesSent int64 // Total bytes sent.
10 DataBytesSent int64 // Data-only bytes sent.
13 func (cs *ConnStats) wroteMsg(msg pp.Message) {
17 cs.DataBytesSent += int64(len(msg.Piece))
21 func (cs *ConnStats) wroteBytes(b []byte) {
22 cs.BytesSent += int64(len(b))