Add buffering to Substream using circular-buffer (#154)

* Add buffering to `Substream` using `circular-buffer`

* Fix freeze and add tests

* Fix tests

* fmt
This commit is contained in:
Jef
2018-03-21 15:41:24 +01:00
committed by Pierre Krieger
parent 5c4aefe457
commit c487b489ce
15 changed files with 355 additions and 155 deletions

View File

@ -75,8 +75,8 @@ fn main() {
})
// On top of plaintext or secio, we will use the multiplex protocol.
.with_upgrade(multiplex::MultiplexConfig)
// The object returned by the call to `with_upgrade(MultiplexConfig)` can't be used as a
.with_upgrade(multiplex::MultiplexConfig::new())
// The object returned by the call to `with_upgrade(MultiplexConfig::new())` can't be used as a
// `Transport` because the output of the upgrade is not a stream but a controller for
// muxing. We have to explicitly call `into_connection_reuse()` in order to turn this into
// a `Transport`.