|
|
@@ -56,10 +56,10 @@ impl OutboundSession {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- /// Start making outbound connections.
|
|
|
- /// Creates a connector object, then starts a connect loop. Loads a valid address then tries to
|
|
|
- /// connect. Once connected, registers the channel, removes it from the list of pending
|
|
|
- /// channels, and starts sending messages across the channel. Otherwise returns a network error.
|
|
|
+ /// Start making outbound connections. Creates a connector object, then starts a
|
|
|
+ /// connect loop. Loads a valid address then tries to connect. Once connected,
|
|
|
+ /// registers the channel, removes it from the list of pending channels, and
|
|
|
+ /// starts sending messages across the channel. Otherwise returns a network error.
|
|
|
pub async fn channel_connect_loop(
|
|
|
self: Arc<Self>,
|
|
|
slot_number: u32,
|
|
|
@@ -102,10 +102,10 @@ impl OutboundSession {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- /// Loops through host addresses to find a outbound address that we can connect to.
|
|
|
- /// Checks whether address is valid by making sure it isn't our own inbound address,
|
|
|
- /// then checks whether it is already connected (exists) or connecting (pending).
|
|
|
- /// Keeps looping until address is found that passes all checks.
|
|
|
+ /// Loops through host addresses to find a outbound address that we can connect
|
|
|
+ /// to. Checks whether address is valid by making sure it isn't our own inbound
|
|
|
+ /// address, then checks whether it is already connected (exists) or connecting
|
|
|
+ /// (pending). Keeps looping until address is found that passes all checks.
|
|
|
async fn load_address(&self, slot_number: u32) -> NetResult<SocketAddr> {
|
|
|
let p2p = self.p2p();
|
|
|
let hosts = p2p.hosts();
|