mirror of
https://github.com/MercuryWorkshop/epoxy-tls.git
synced 2025-05-12 22:10:01 -04:00
remove appendingwebsocketread, specialcase data/close
This commit is contained in:
parent
0d12bff084
commit
14f38b28b8
5 changed files with 56 additions and 59 deletions
|
@ -8,7 +8,7 @@ pub use server::ServerMux;
|
|||
|
||||
use crate::{
|
||||
extensions::{udp::UdpProtocolExtension, AnyProtocolExtension, AnyProtocolExtensionBuilder},
|
||||
ws::{Frame, LockedWebSocketWrite},
|
||||
ws::LockedWebSocketWrite,
|
||||
CloseReason, Packet, PacketType, Role, WispError,
|
||||
};
|
||||
|
||||
|
@ -22,12 +22,12 @@ enum WispHandshakeResultKind {
|
|||
extensions: Vec<AnyProtocolExtension>,
|
||||
},
|
||||
V1 {
|
||||
frame: Option<Frame<'static>>,
|
||||
frame: Option<Packet<'static>>,
|
||||
},
|
||||
}
|
||||
|
||||
impl WispHandshakeResultKind {
|
||||
pub fn into_parts(self) -> (Vec<AnyProtocolExtension>, Option<Frame<'static>>) {
|
||||
pub fn into_parts(self) -> (Vec<AnyProtocolExtension>, Option<Packet<'static>>) {
|
||||
match self {
|
||||
Self::V2 { extensions } => (extensions, None),
|
||||
Self::V1 { frame } => (vec![UdpProtocolExtension.into()], frame),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue