continue
}
stream.stats.pkts++
- stream.stats.bytes += uint64(n)
+ stream.stats.bytes += vors.IPHdrLen(from.IP) + 8 + uint64(n)
ctr = binary.BigEndian.Uint32(buf)
if ctr <= stream.ctr {
stream.stats.reorder++
continue
}
OurStats.pkts++
- OurStats.bytes += 1
+ OurStats.bytes += vors.IPHdrLen(srvAddrUDP.IP) + 8 + 1
if _, err = conn.Write([]byte{sid}); err != nil {
log.Println("send:", err)
Finish <- struct{}{}
pkt = buf[:4+n+vors.TagLen]
OurStats.pkts++
- OurStats.bytes += uint64(len(pkt))
+ OurStats.bytes += vors.IPHdrLen(srvAddrUDP.IP) + 8 + uint64(len(pkt))
OurStats.last = time.Now()
OurStats.AddRMS(pcm)
if _, err = conn.Write(pkt); err != nil {