mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-20 05:16:35 +00:00
Re-export OneShotHandlerConfig. Make fields public. (#1538)
Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com>
This commit is contained in:
@ -77,6 +77,7 @@ pub use protocols_handler::{
|
|||||||
ProtocolsHandlerSelect,
|
ProtocolsHandlerSelect,
|
||||||
ProtocolsHandlerUpgrErr,
|
ProtocolsHandlerUpgrErr,
|
||||||
OneShotHandler,
|
OneShotHandler,
|
||||||
|
OneShotHandlerConfig,
|
||||||
SubstreamProtocol
|
SubstreamProtocol
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -63,7 +63,7 @@ pub use dummy::DummyProtocolsHandler;
|
|||||||
pub use map_in::MapInEvent;
|
pub use map_in::MapInEvent;
|
||||||
pub use map_out::MapOutEvent;
|
pub use map_out::MapOutEvent;
|
||||||
pub use node_handler::{NodeHandlerWrapper, NodeHandlerWrapperBuilder, NodeHandlerWrapperError};
|
pub use node_handler::{NodeHandlerWrapper, NodeHandlerWrapperBuilder, NodeHandlerWrapperError};
|
||||||
pub use one_shot::OneShotHandler;
|
pub use one_shot::{OneShotHandler, OneShotHandlerConfig};
|
||||||
pub use select::{IntoProtocolsHandlerSelect, ProtocolsHandlerSelect};
|
pub use select::{IntoProtocolsHandlerSelect, ProtocolsHandlerSelect};
|
||||||
|
|
||||||
/// A handler for a set of protocols used on a connection with a remote.
|
/// A handler for a set of protocols used on a connection with a remote.
|
||||||
|
@ -245,9 +245,9 @@ where
|
|||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct OneShotHandlerConfig {
|
pub struct OneShotHandlerConfig {
|
||||||
/// After the given duration has elapsed, an inactive connection will shutdown.
|
/// After the given duration has elapsed, an inactive connection will shutdown.
|
||||||
inactive_timeout: Duration,
|
pub inactive_timeout: Duration,
|
||||||
/// Timeout duration for each newly opened outbound substream.
|
/// Timeout duration for each newly opened outbound substream.
|
||||||
substream_timeout: Duration,
|
pub substream_timeout: Duration,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for OneShotHandlerConfig {
|
impl Default for OneShotHandlerConfig {
|
||||||
|
Reference in New Issue
Block a user