Struct libp2p_core::connection::EstablishedConnection [−][src]
pub struct EstablishedConnection<'a, TInEvent> { /* fields omitted */ }
Expand description
An established connection in a pool.
Implementations
Returns information about the connected endpoint.
Returns the local connection ID.
(Asynchronously) sends an event to the connection handler.
If the handler is not ready to receive the event, either because
it is busy or the connection is about to close, the given event
is returned with an Err
.
If execution of this method is preceded by successful execution of
poll_ready_notify_handler
without another intervening execution
of notify_handler
, it only fails if the connection is now about
to close.
Checks if notify_handler
is ready to accept an event.
Returns Ok(())
if the handler is ready to receive an event via notify_handler
.
Returns Err(())
if the background task associated with the connection
is terminating and the connection is about to close.
Initiates a graceful close of the connection.
Has no effect if the connection is already closing.