@ -1,3 +1,5 @@
//! handshake machine.
use bytes::Buf;
use log::*;
use std::io::{Cursor, Read, Write};
@ -3,8 +3,6 @@
pub mod client;
pub mod headers;
pub mod server;
#[allow(missing_docs)]
pub mod machine;
use std::{
@ -93,8 +93,7 @@ pub fn create_response_with_body<T>(
Ok(create_parts(request)?.body(generate_body())?)
}
// Assumes that this is a valid response
/// Write response to the stream `w`.
pub fn write_response<T>(mut w: impl io::Write, response: &HttpResponse<T>) -> Result<()> {
writeln!(
w,