mirror of
https://github.com/MercuryWorkshop/epoxy-tls.git
synced 2025-05-13 14:30:02 -04:00
some optimizations and muxprotocolextensionstream for stream id 0
This commit is contained in:
parent
3b8dedeba2
commit
b3f35b232f
7 changed files with 237 additions and 170 deletions
|
@ -30,7 +30,7 @@ impl From<Frame<'_>> for crate::ws::Frame {
|
|||
Self {
|
||||
finished: frame.fin,
|
||||
opcode: frame.opcode.into(),
|
||||
payload: BytesMut::from(frame.payload.deref()).freeze(),
|
||||
payload: BytesMut::from(frame.payload.deref()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -38,7 +38,7 @@ impl From<Frame<'_>> for crate::ws::Frame {
|
|||
impl<'a> From<crate::ws::Frame> for Frame<'a> {
|
||||
fn from(frame: crate::ws::Frame) -> Self {
|
||||
use crate::ws::OpCode::*;
|
||||
let payload = Payload::Owned(frame.payload.into());
|
||||
let payload = Payload::Bytes(frame.payload);
|
||||
match frame.opcode {
|
||||
Text => Self::text(payload),
|
||||
Binary => Self::binary(payload),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue