mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-07-07 05:31:34 +00:00
swarm/src: Remove ConnectionHandler (#2519)
The `ConnectionHandler` trait is not exposed to users. The only implementor of `ConnectionHandler` is `NodeHandlerWrapper`. Thus `ConnectionHandler` is a superfluous abstraction. This commit removes `ConnectionHandler`. Next to this large change, this commit removes the `Tmuxer` trait parameter. `Swarm` enforces dynamic dispatching via `StreamMuxerBox` anyways, thus the trait parameter is useless. As a follow up to this commit one could rename `ProtocolsHandler` to `ConnectionHandler` and `NodeHandlerWrapper` to `ConnectionHandlerWrapper` or just `Wrapper`.
This commit is contained in:
@ -55,7 +55,10 @@ use std::{cmp::Ordering, error, fmt, task::Context, task::Poll, time::Duration};
|
||||
pub use dummy::DummyProtocolsHandler;
|
||||
pub use map_in::MapInEvent;
|
||||
pub use map_out::MapOutEvent;
|
||||
pub use node_handler::{NodeHandlerWrapper, NodeHandlerWrapperBuilder, NodeHandlerWrapperError};
|
||||
pub use node_handler::{
|
||||
NodeHandlerWrapper, NodeHandlerWrapperBuilder, NodeHandlerWrapperError,
|
||||
NodeHandlerWrapperEvent, NodeHandlerWrapperOutboundOpenInfo,
|
||||
};
|
||||
pub use one_shot::{OneShotHandler, OneShotHandlerConfig};
|
||||
pub use select::{IntoProtocolsHandlerSelect, ProtocolsHandlerSelect};
|
||||
|
||||
|
Reference in New Issue
Block a user