mirror of
https://github.com/MercuryWorkshop/epoxy-tls.git
synced 2025-05-12 22:10:01 -04:00
rename to transportread/transportwrite/transportreadext/transportext
This commit is contained in:
parent
3f381d6b39
commit
a986fc07c4
16 changed files with 96 additions and 96 deletions
|
@ -22,11 +22,11 @@ use crate::{
|
|||
PacketType, StreamType,
|
||||
},
|
||||
stream::MuxStream,
|
||||
ws::{Payload, WebSocketRead, WebSocketWrite},
|
||||
ws::{Payload, TransportRead, TransportWrite},
|
||||
LockedWebSocketWrite, WispError,
|
||||
};
|
||||
|
||||
pub(crate) enum WsEvent<W: WebSocketWrite> {
|
||||
pub(crate) enum WsEvent<W: TransportWrite> {
|
||||
Close(u32, ClosePacket, oneshot::Sender<Result<(), WispError>>),
|
||||
CreateStream(
|
||||
ConnectPacket,
|
||||
|
@ -135,7 +135,7 @@ impl StreamInfo {
|
|||
}
|
||||
}
|
||||
|
||||
pub(crate) trait MultiplexorActor<W: WebSocketWrite>: Send {
|
||||
pub(crate) trait MultiplexorActor<W: TransportWrite>: Send {
|
||||
fn handle_connect_packet(
|
||||
&mut self,
|
||||
stream: MuxStream<W>,
|
||||
|
@ -164,14 +164,14 @@ pub(crate) trait MultiplexorActor<W: WebSocketWrite>: Send {
|
|||
fn get_flow_control(ty: StreamType, flow_stream_types: &[u8]) -> FlowControl;
|
||||
}
|
||||
|
||||
struct MuxStart<R: WebSocketRead, W: WebSocketWrite> {
|
||||
struct MuxStart<R: TransportRead, W: TransportWrite> {
|
||||
rx: R,
|
||||
downgrade: Option<Packet<'static>>,
|
||||
extensions: Vec<AnyProtocolExtension>,
|
||||
actor_rx: flume::Receiver<WsEvent<W>>,
|
||||
}
|
||||
|
||||
pub(crate) struct MuxInner<R: WebSocketRead, W: WebSocketWrite, M: MultiplexorActor<W>> {
|
||||
pub(crate) struct MuxInner<R: TransportRead, W: TransportWrite, M: MultiplexorActor<W>> {
|
||||
start: Option<MuxStart<R, W>>,
|
||||
tx: LockedWebSocketWrite<W>,
|
||||
flow_stream_types: Box<[u8]>,
|
||||
|
@ -185,12 +185,12 @@ pub(crate) struct MuxInner<R: WebSocketRead, W: WebSocketWrite, M: MultiplexorAc
|
|||
actor_tx: flume::Sender<WsEvent<W>>,
|
||||
}
|
||||
|
||||
pub(crate) struct MuxInnerResult<R: WebSocketRead, W: WebSocketWrite, M: MultiplexorActor<W>> {
|
||||
pub(crate) struct MuxInnerResult<R: TransportRead, W: TransportWrite, M: MultiplexorActor<W>> {
|
||||
pub mux: MuxInner<R, W, M>,
|
||||
pub actor_tx: flume::Sender<WsEvent<W>>,
|
||||
}
|
||||
|
||||
impl<R: WebSocketRead, W: WebSocketWrite, M: MultiplexorActor<W>> MuxInner<R, W, M> {
|
||||
impl<R: TransportRead, W: TransportWrite, M: MultiplexorActor<W>> MuxInner<R, W, M> {
|
||||
#[expect(clippy::new_ret_no_self)]
|
||||
pub fn new(
|
||||
rx: R,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue