Merge pull request #58 from bboreham/50_show_ip
Show the IP address on the end of each connection Closes #50
This commit is contained in:
commit
2e66694355
1 file changed
+2
-2
+2
-2
@@ -105,8 +105,8 @@ func (cache *PeerCache) String() string {
|
|||||||
var buf bytes.Buffer
|
var buf bytes.Buffer
|
||||||
cache.ForEach(func(name PeerName, peer *Peer) {
|
cache.ForEach(func(name PeerName, peer *Peer) {
|
||||||
buf.WriteString(fmt.Sprint(peer, "\n"))
|
buf.WriteString(fmt.Sprint(peer, "\n"))
|
||||||
peer.ForEachConnection(func(remoteName PeerName, _ Connection) {
|
peer.ForEachConnection(func(remoteName PeerName, conn Connection) {
|
||||||
buf.WriteString(fmt.Sprintf(" -> %v\n", remoteName))
|
buf.WriteString(fmt.Sprintf(" -> %v [%v]\n", remoteName, conn.RemoteTCPAddr()))
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
return buf.String()
|
return buf.String()
|
||||||
|
|||||||
Reference in new issue
Block a user