Unbox server handshake future (#52)

Server-side version of #42. I've rewritten `server::Handshake` as a hand-rolled `Future` rather than as a `Box<Future>`. In addition to removing a `Box`, this also means that the `'static` lifetime bounds on the type parameters `T` and `B` can be removed.

The type of the server handshake future is somewhat more complex than the client-side handshake future. Note also that I've had to re-export `proto::streams::Prioritized` as `pub(crate)` from `proto`, as it appears in the type of the handshake future.

I've ran the tests against this branch and everything passes. Since no new functionality was added, I haven't added any additional tests.

This also fixes #158 - I had accidentally committed a Darwin h2spec executable and that's what was breaking CI.
This commit is contained in:
Eliza Weisman
2017-10-19 12:21:13 -07:00
committed by GitHub
parent 58c55564e2
commit 1e126aa752
2 changed files with 125 additions and 28 deletions

View File

@@ -9,12 +9,11 @@ pub(crate) use self::connection::Connection;
pub(crate) use self::error::Error;
pub(crate) use self::peer::Peer;
pub(crate) use self::streams::{Key as StreamKey, StreamRef, Streams};
pub(crate) use self::streams::Prioritized;
use codec::Codec;
use self::ping_pong::PingPong;
use self::settings::Settings;
use self::streams::Prioritized;
use frame::{self, Frame};