1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-07-01 16:55:08 +02:00

add ws and http2 feature flags (#2618)

This commit is contained in:
Rob Ede
2022-01-31 21:22:23 +00:00
committed by GitHub
parent 3200de3f34
commit cd511affd5
18 changed files with 148 additions and 57 deletions

View File

@ -3,9 +3,11 @@ use bitflags::bitflags;
use bytes::{Bytes, BytesMut};
use bytestring::ByteString;
use super::frame::Parser;
use super::proto::{CloseReason, OpCode};
use super::ProtocolError;
use super::{
frame::Parser,
proto::{CloseReason, OpCode},
ProtocolError,
};
/// A WebSocket message.
#[derive(Debug, PartialEq)]
@ -251,7 +253,7 @@ impl Decoder for Codec {
}
}
_ => {
error!("Unfinished fragment {:?}", opcode);
log::error!("Unfinished fragment {:?}", opcode);
Err(ProtocolError::ContinuationFragment(opcode))
}
};

View File

@ -1,6 +1,8 @@
use std::future::Future;
use std::pin::Pin;
use std::task::{Context, Poll};
use std::{
future::Future,
pin::Pin,
task::{Context, Poll},
};
use actix_codec::{AsyncRead, AsyncWrite, Framed};
use actix_service::{IntoService, Service};

View File

@ -3,9 +3,11 @@ use std::convert::TryFrom;
use bytes::{Buf, BufMut, BytesMut};
use log::debug;
use crate::ws::mask::apply_mask;
use crate::ws::proto::{CloseCode, CloseReason, OpCode};
use crate::ws::ProtocolError;
use super::{
mask::apply_mask,
proto::{CloseCode, CloseReason, OpCode},
ProtocolError,
};
/// A struct representing a WebSocket frame.
#[derive(Debug)]