Skip to content

Commit

Permalink
Re-export OneShotHandlerConfig. Make fields public. (#1538)
Browse files Browse the repository at this point in the history
Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com>
  • Loading branch information
romanb and tomaka committed Apr 1, 2020
1 parent 1ddb4c4 commit 6af530d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions swarm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ pub use protocols_handler::{
ProtocolsHandlerSelect,
ProtocolsHandlerUpgrErr,
OneShotHandler,
OneShotHandlerConfig,
SubstreamProtocol
};

Expand Down
2 changes: 1 addition & 1 deletion swarm/src/protocols_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ pub use dummy::DummyProtocolsHandler;
pub use map_in::MapInEvent;
pub use map_out::MapOutEvent;
pub use node_handler::{NodeHandlerWrapper, NodeHandlerWrapperBuilder, NodeHandlerWrapperError};
pub use one_shot::OneShotHandler;
pub use one_shot::{OneShotHandler, OneShotHandlerConfig};
pub use select::{IntoProtocolsHandlerSelect, ProtocolsHandlerSelect};

/// A handler for a set of protocols used on a connection with a remote.
Expand Down
4 changes: 2 additions & 2 deletions swarm/src/protocols_handler/one_shot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -245,9 +245,9 @@ where
#[derive(Debug)]
pub struct OneShotHandlerConfig {
/// 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.
substream_timeout: Duration,
pub substream_timeout: Duration,
}

impl Default for OneShotHandlerConfig {
Expand Down

0 comments on commit 6af530d

Please sign in to comment.