Enum libp2p::core::connection::ListenersEvent [−][src]
pub enum ListenersEvent<TTrans> where
TTrans: Transport, {
NewAddress {
listener_id: ListenerId,
listen_addr: Multiaddr,
},
AddressExpired {
listener_id: ListenerId,
listen_addr: Multiaddr,
},
Incoming {
listener_id: ListenerId,
upgrade: <TTrans as Transport>::ListenerUpgrade,
local_addr: Multiaddr,
send_back_addr: Multiaddr,
},
Closed {
listener_id: ListenerId,
addresses: Vec<Multiaddr, Global>,
reason: Result<(), <TTrans as Transport>::Error>,
},
Error {
listener_id: ListenerId,
error: <TTrans as Transport>::Error,
},
}
Expand description
Event that can happen on the ListenersStream
.
Variants
A new address is being listened on.
Fields of NewAddress
listener_id: ListenerId
The listener that is listening on the new address.
listen_addr: Multiaddr
The new address that is being listened on.
An address is no longer being listened on.
Fields of AddressExpired
listener_id: ListenerId
The listener that is no longer listening on the address.
listen_addr: Multiaddr
The new address that is being listened on.
A connection is incoming on one of the listeners.
Fields of Incoming
listener_id: ListenerId
The listener that produced the upgrade.
upgrade: <TTrans as Transport>::ListenerUpgrade
The produced upgrade.
local_addr: Multiaddr
Local connection address.
send_back_addr: Multiaddr
Address used to send back data to the incoming client.
A listener closed.
Fields of Closed
A listener errored.
The listener will continue to be polled for new events and the event is for informational purposes only.
Fields of Error
listener_id: ListenerId
The ID of the listener that errored.
error: <TTrans as Transport>::Error
The error value.