mirror of
https://github.com/PeernetOfficial/core.git
synced 2026-07-23 13:17:49 +01:00
VirtualPacketConn: New Stats field maintained by caller. This allows insight into active transfers.
New FileTransferStats and BlockTransferStats structures.
This commit is contained in:
@@ -423,9 +423,9 @@ func (nets *Networks) packetWorkerLite() {
|
||||
|
||||
// Handle the received data. Note this is called in the same Go routine.
|
||||
// The underlying data receiver must not stall.
|
||||
if v, ok := packet.Session.Data.(*virtualPacketConn); ok {
|
||||
if v, ok := packet.Session.Data.(*VirtualPacketConn); ok {
|
||||
// update stats TODO
|
||||
//atomic.AddUint64(&packet.Session.Data.(*virtualPacketConn).peer.StatsPacketReceived, 1)
|
||||
//atomic.AddUint64(&packet.Session.Data.(*VirtualPacketConn).peer.StatsPacketReceived, 1)
|
||||
//connection.LastPacketIn = time.Now()
|
||||
|
||||
v.receiveData(packet.Payload)
|
||||
|
||||
Reference in New Issue
Block a user