Misc renames (#202)
This patch renames a number of types and functions making the API more consistent. * `Server` -> `Connection` * `Client` -> `SendRequest` * `Respond` -> `SendResponse`. It also moves the handshake fns off of `Connection` and make them free fns in the module. And `Connection::builder` is removed in favor of `Builder::new`.
This commit is contained in:
@@ -8,7 +8,7 @@ extern crate tokio_core;
|
||||
extern crate tokio_rustls;
|
||||
extern crate webpki_roots;
|
||||
|
||||
use h2::client::Client;
|
||||
use h2::client;
|
||||
|
||||
use futures::*;
|
||||
use http::{Method, Request};
|
||||
@@ -64,7 +64,7 @@ pub fn main() {
|
||||
let tls = io_dump::Dump::to_stdout(tls);
|
||||
|
||||
println!("Starting client handshake");
|
||||
Client::handshake(tls)
|
||||
client::handshake(tls)
|
||||
})
|
||||
.then(|res| {
|
||||
let (mut client, h2) = res.unwrap();
|
||||
|
||||
Reference in New Issue
Block a user