mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-28 22:25:07 +03:00
Add support for Multipath TCP
This commit is contained in:
parent
fec96a38a4
commit
ed8991571a
9 changed files with 108 additions and 48 deletions
|
@ -30,6 +30,7 @@ type PeerInfo struct {
|
|||
Coords []uint64
|
||||
Port uint64
|
||||
Priority uint8
|
||||
Multipath bool
|
||||
RXBytes uint64
|
||||
TXBytes uint64
|
||||
Uptime time.Duration
|
||||
|
@ -87,6 +88,7 @@ func (c *Core) GetPeers() []PeerInfo {
|
|||
peerinfo.RXBytes = atomic.LoadUint64(&c.rx)
|
||||
peerinfo.TXBytes = atomic.LoadUint64(&c.tx)
|
||||
peerinfo.Uptime = time.Since(c.up)
|
||||
peerinfo.Multipath = isMPTCP(c)
|
||||
}
|
||||
if p, ok := conns[conn]; ok {
|
||||
peerinfo.Key = p.Key
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue