aboutsummaryrefslogtreecommitdiff
path: root/dht/peer.go
diff options
context:
space:
mode:
Diffstat (limited to 'dht/peer.go')
-rw-r--r--dht/peer.go10
1 files changed, 7 insertions, 3 deletions
diff --git a/dht/peer.go b/dht/peer.go
index a801331..f9669ba 100644
--- a/dht/peer.go
+++ b/dht/peer.go
@@ -1,9 +1,13 @@
package dht
-import "net"
+import "fmt"
// Peer on DHT network
type Peer struct {
- Address net.UDPAddr
- ID Infohash
+ Node remoteNode
+ Infohash Infohash
+}
+
+func (p Peer) String() string {
+ return fmt.Sprintf("%s (%s)", p.Infohash, p.Node)
}