pub enum TcpListenerEvent<S> {
    NewAddress(Multiaddr),
    Upgrade {
        upgrade: Ready<Result<S, Error>>,
        local_addr: Multiaddr,
        remote_addr: Multiaddr,
    },
    AddressExpired(Multiaddr),
    Error(Error),
}
Expand description

Event produced by a TcpListenStream.

Variants

NewAddress(Multiaddr)

The listener is listening on a new additional [Multiaddr].

Upgrade

Fields

upgrade: Ready<Result<S, Error>>

The upgrade.

local_addr: Multiaddr

The local address which produced this upgrade.

remote_addr: Multiaddr

The remote address which produced this upgrade.

An upgrade, consisting of the upgrade future, the listener address and the remote address.

AddressExpired(Multiaddr)

A [Multiaddr] is no longer used for listening.

Error(Error)

A non-fatal error has happened on the listener.

This event should be generated in order to notify the user that something wrong has happened. The listener, however, continues to run.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.