1
0
mirror of https://github.com/actix/actix-extras.git synced 2025-07-01 04:05:09 +02:00

basic websocket client

This commit is contained in:
Nikolay Kim
2018-01-27 22:03:03 -08:00
parent 4821d51167
commit 5dd2e7523d
17 changed files with 1332 additions and 74 deletions

View File

@ -550,7 +550,7 @@ impl Reader {
}
/// Check if request has chunked transfer encoding
fn chunked(headers: &HeaderMap) -> Result<bool, ParseError> {
pub fn chunked(headers: &HeaderMap) -> Result<bool, ParseError> {
if let Some(encodings) = headers.get(header::TRANSFER_ENCODING) {
if let Ok(s) = encodings.to_str() {
Ok(s.to_lowercase().contains("chunked"))
@ -567,7 +567,7 @@ fn chunked(headers: &HeaderMap) -> Result<bool, ParseError> {
/// If a message body does not include a Transfer-Encoding, it *should*
/// include a Content-Length header.
#[derive(Debug, Clone, PartialEq)]
struct Decoder {
pub struct Decoder {
kind: Kind,
}

View File

@ -9,14 +9,14 @@ use tokio_core::net::TcpStream;
mod srv;
mod worker;
mod channel;
mod encoding;
mod h1;
pub(crate) mod encoding;
pub(crate) mod h1;
mod h2;
mod h1writer;
mod h2writer;
mod settings;
mod shared;
mod utils;
pub(crate) mod shared;
pub(crate) mod utils;
pub use self::srv::HttpServer;
pub use self::settings::ServerSettings;