net/interface: move more to Dialer
Juan Batiz-Benet committed
Dec 23, 2014 at 22:00 UTC
0013415db87840fb0e00de5f820565f7fc1c00c9
1 file changed
+9
-9
net/interface.go
+9
-9
@@ -82,15 +82,6 @@ type Network interface {
82
// If ProtocolID is "", writes no header.
83
NewStream(ProtocolID, peer.ID) (Stream, error)
84
85
- // Peers returns the peers connected
86
- Peers() []peer.ID
87
-
88
- // Conns returns the connections in this Netowrk
89
- Conns() []Conn
90
-
91
- // ConnsToPeer returns the connections in this Netowrk for given peer.
92
- ConnsToPeer(p peer.ID) []Conn
93
-
85
// BandwidthTotals returns the total number of bytes passed through
86
// the network since it was instantiated
87
BandwidthTotals() (uint64, uint64)
@@ -133,6 +124,15 @@ type Dialer interface {
124
125
// Connectedness returns a state signaling connection capabilities
126
Connectedness(peer.ID) Connectedness
127
+
128
+ // Peers returns the peers connected
129
+ Peers() []peer.ID
130
+
131
+ // Conns returns the connections in this Netowrk
132
+ Conns() []Conn
133
+
134
+ // ConnsToPeer returns the connections in this Netowrk for given peer.
135
+ ConnsToPeer(p peer.ID) []Conn
136
}
137
138
// Connectedness signals the capacity for a connection with a given node.