mirror of
https://github.com/MercuryWorkshop/epoxy-tls.git
synced 2025-05-13 06:20:02 -04:00
use identity hash function
This commit is contained in:
parent
9cd87b7243
commit
b70f91f90a
3 changed files with 13 additions and 4 deletions
|
@ -1,17 +1,18 @@
|
|||
use std::{
|
||||
collections::HashMap,
|
||||
sync::{
|
||||
atomic::{AtomicBool, AtomicU32, Ordering},
|
||||
Arc,
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
use crate::{
|
||||
extensions::AnyProtocolExtension,
|
||||
ws::{Frame, LockedWebSocketWrite, OpCode, Payload, WebSocketRead},
|
||||
AtomicCloseReason, ClosePacket, CloseReason, ConnectPacket, MuxStream, Packet, PacketType,
|
||||
Role, StreamType, WispError,
|
||||
};
|
||||
use nohash_hasher::IntMap;
|
||||
use bytes::{Bytes, BytesMut};
|
||||
use event_listener::Event;
|
||||
use flume as mpsc;
|
||||
|
@ -51,7 +52,7 @@ pub struct MuxInner<R: WebSocketRead + Send> {
|
|||
fut_tx: mpsc::Sender<WsEvent>,
|
||||
fut_exited: Arc<AtomicBool>,
|
||||
|
||||
stream_map: HashMap<u32, MuxMapValue>,
|
||||
stream_map: IntMap<u32, MuxMapValue>,
|
||||
|
||||
buffer_size: u32,
|
||||
target_buffer_size: u32,
|
||||
|
@ -91,7 +92,7 @@ impl<R: WebSocketRead + Send> MuxInner<R> {
|
|||
|
||||
role: Role::Server,
|
||||
|
||||
stream_map: HashMap::new(),
|
||||
stream_map: IntMap::default(),
|
||||
|
||||
server_tx,
|
||||
},
|
||||
|
@ -127,7 +128,7 @@ impl<R: WebSocketRead + Send> MuxInner<R> {
|
|||
|
||||
role: Role::Client,
|
||||
|
||||
stream_map: HashMap::new(),
|
||||
stream_map: IntMap::default(),
|
||||
|
||||
server_tx,
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue