diff options
author | Mathias Hall-Andersen <mathias@hall-andersen.dk> | 2017-07-18 15:22:56 +0200 |
---|---|---|
committer | Mathias Hall-Andersen <mathias@hall-andersen.dk> | 2017-07-18 15:22:56 +0200 |
commit | 18714fc4a444f3369dc9ca25e5a6e50343770ea4 (patch) | |
tree | 2f517973541ac510895a878c5dd9dff86927d947 /src/peer.go | |
parent | bd6027a4d5114df964e88e357b52883411174558 (diff) |
Added last_handshake_time fields to UAPI
Diffstat (limited to 'src/peer.go')
-rw-r--r-- | src/peer.go | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/peer.go b/src/peer.go index 408c605..8eea929 100644 --- a/src/peer.go +++ b/src/peer.go @@ -19,9 +19,12 @@ type Peer struct { keyPairs KeyPairs handshake Handshake device *Device - txBytes uint64 - rxBytes uint64 - time struct { + stats struct { + txBytes uint64 // bytes send to peer (endpoint) + rxBytes uint64 // bytes received from peer + lastHandshakeNano int64 // nano seconds since epoch + } + time struct { mutex sync.RWMutex lastSend time.Time // last send message lastHandshake time.Time // last completed handshake |