aboutsummaryrefslogtreecommitdiffstats
path: root/src/peer.go
diff options
context:
space:
mode:
authorMathias Hall-Andersen <mathias@hall-andersen.dk>2017-10-08 22:03:32 +0200
committerMathias Hall-Andersen <mathias@hall-andersen.dk>2017-10-08 22:03:32 +0200
commita72b0f7ae5dda27d839bb317b7c01d11b215e77a (patch)
treebd70e6fc71574b300e6e928b7887d69c7cf4ddef /src/peer.go
parentBegin incorporating new src cache into receive (diff)
downloadwireguard-go-a72b0f7ae5dda27d839bb317b7c01d11b215e77a.tar.xz
wireguard-go-a72b0f7ae5dda27d839bb317b7c01d11b215e77a.zip
Added new UDPBind interface
Diffstat (limited to '')
-rw-r--r--src/peer.go5
1 files changed, 2 insertions, 3 deletions
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[:]),
)
}