func (peer *localPeer) getConnections() connectionSet {
	connections := make(connectionSet)
	peer.RLock()
	defer peer.RUnlock()
	for _, conn := range peer.connections {
		connections[conn] = struct{}{}
	}
	return connections
}
func (peer *localPeer) getConnections() connectionSet {
	connections := make(connectionSet)
	peer.RLock()
	defer peer.RUnlock()
	for _, conn := range peer.connections {
		connections[conn] = struct{}{}
	}
	return connections
}
func ( peer * localPeer ) getConnections ( ) connectionSet { connections := make ( connectionSet ) peer . RLock ( ) defer peer . RUnlock ( ) for _ , conn := range peer . connections { connections [ conn ] = struct { } { } } return connections }
// Connections returns all the connections that the local peer is aware of.
Connections returns all the connections that the local peer is aware of .