Replace listen_addr with local_addr. (#1223)

* Replace `listen_addr` with `local_addr`.

In `ListenerUpgrade`, `ConnectedPoint` and other event types where we
were previously using the listen address we now report the local address
of an incoming connection. The reason being that it is difficult to get
the listen address right. In case clients want to know, which listener
produced an incoming connection upgrade they are advised to use the
`ListenerId` for such purposes.

* Update transports/tcp/src/lib.rs

Co-Authored-By: Max Inden <mail@max-inden.de>
This commit is contained in:
Toralf Wittner
2019-08-15 13:18:19 +02:00
committed by Pierre Krieger
parent 56c14071d8
commit 9793c42859
13 changed files with 118 additions and 119 deletions

View File

@ -110,8 +110,8 @@ pub enum ConnectedPoint {
},
/// We received the node.
Listener {
/// Address of the listener that received the connection.
listen_addr: Multiaddr,
/// Local connection address.
local_addr: Multiaddr,
/// Stack of protocols used to send back data to the remote.
send_back_addr: Multiaddr,
}