From a72b0f7ae5dda27d839bb317b7c01d11b215e77a Mon Sep 17 00:00:00 2001 From: Mathias Hall-Andersen Date: Sun, 8 Oct 2017 22:03:32 +0200 Subject: Added new UDPBind interface --- src/peer.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/peer.go') diff --git a/src/peer.go b/src/peer.go index 6fea829..791c091 100644 --- a/src/peer.go +++ b/src/peer.go @@ -4,7 +4,6 @@ import ( "encoding/base64" "errors" "fmt" - "net" "sync" "time" ) @@ -15,8 +14,8 @@ type Peer struct { persistentKeepaliveInterval uint64 keyPairs KeyPairs handshake Handshake + endpoint Endpoint device *Device - endpoint *net.UDPAddr stats struct { txBytes uint64 // bytes send to peer (endpoint) rxBytes uint64 // bytes received from peer @@ -134,7 +133,7 @@ func (peer *Peer) String() string { return fmt.Sprintf( "peer(%d %s %s)", peer.id, - peer.endpoint.String(), + peer.endpoint.DestinationToString(), base64.StdEncoding.EncodeToString(peer.handshake.remoteStatic[:]), ) } -- cgit v1.2.3