mirror of
https://github.com/PeernetOfficial/core.git
synced 2026-07-17 02:47:51 +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:
@@ -186,3 +186,14 @@ func (router *LiteRouter) RegisterLiteID(id uuid.UUID, data interface{}, timeout
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// Returns all lite sessions
|
||||
func (router *LiteRouter) All() (sessions []*LiteID) {
|
||||
router.Lock()
|
||||
for _, info := range router.ids {
|
||||
sessions = append(sessions, info)
|
||||
}
|
||||
router.Unlock()
|
||||
|
||||
return sessions
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user