Get a request sent

This commit is contained in:
Carl Lerche
2017-06-26 22:25:25 -07:00
parent ac2959e956
commit 7897b770e9
15 changed files with 296 additions and 125 deletions

View File

@@ -1,35 +1,30 @@
mod connection;
mod framed_read;
mod framed_write;
mod handshake;
mod ping_pong;
mod ready;
mod settings;
mod state;
pub use self::connection::{Connection, new as new_connection};
pub use self::connection::{Connection};
pub use self::framed_read::FramedRead;
pub use self::framed_write::FramedWrite;
pub use self::handshake::Handshake;
pub use self::ping_pong::PingPong;
pub use self::ready::ReadySink;
pub use self::settings::Settings;
pub use self::state::State;
use frame;
use tokio_io::codec::length_delimited;
/// A request or response issued by the current process.
pub struct SendMessage {
frame: frame::Headers,
}
/// Base HTTP/2.0 transport. Only handles framing.
type Framed<T> =
FramedWrite<
FramedRead<
length_delimited::FramedRead<T>>>;
/// A request or response received by the current process.
pub struct PollMessage {
frame: frame::Headers,
}
impl SendMessage {
pub fn new(frame: frame::Headers) -> Self {
SendMessage {
frame: frame,
}
}
}
type Inner<T> =
Settings<
PingPong<
Framed<T>>>;