Skip to content

Commit

Permalink
Add some helpers for substream upgrades (#896)
Browse files Browse the repository at this point in the history
* Add some helpers for substream upgrades

* Fix compilation

* Fix compilation for 32bits

* Fix some concerns

* Add read_one_then

* Fixes
  • Loading branch information
tomaka authored Jan 29, 2019
1 parent fe4fc8c commit b8dfa72
Show file tree
Hide file tree
Showing 4 changed files with 550 additions and 66 deletions.
1 change: 1 addition & 0 deletions core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ smallvec = "0.6"
tokio-executor = "0.1.4"
tokio-io = "0.1"
tokio-timer = "0.2"
unsigned-varint = "0.2"
void = "1"

[dev-dependencies]
Expand Down
4 changes: 3 additions & 1 deletion core/src/upgrade/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ mod either;
mod error;
mod map;
mod select;
mod transfer;

use futures::future::Future;

Expand All @@ -72,7 +73,8 @@ pub use self::{
either::EitherUpgrade,
error::UpgradeError,
map::{MapInboundUpgrade, MapOutboundUpgrade, MapInboundUpgradeErr, MapOutboundUpgradeErr},
select::SelectUpgrade
select::SelectUpgrade,
transfer::{write_one, WriteOne, read_one, ReadOne, read_one_then, ReadOneThen, ReadOneError, request_response, RequestResponse},
};

/// Types serving as protocol names.
Expand Down
Loading

0 comments on commit b8dfa72

Please sign in to comment.