mirror of
https://github.com/MercuryWorkshop/epoxy-tls.git
synced 2025-05-12 14:00:01 -04:00
wisp net
This commit is contained in:
parent
3cef68d164
commit
13f282160b
17 changed files with 482 additions and 65 deletions
|
@ -191,6 +191,7 @@ impl ProtocolExtension for CertAuthProtocolExtension {
|
|||
|
||||
async fn handle_packet(
|
||||
&mut self,
|
||||
_: u8,
|
||||
_: Bytes,
|
||||
_: &mut DynWebSocketRead,
|
||||
_: &dyn LockingWebSocketWrite,
|
||||
|
|
|
@ -112,6 +112,7 @@ pub trait ProtocolExtension: std::fmt::Debug + Sync + Send + 'static {
|
|||
/// Handle receiving a packet.
|
||||
async fn handle_packet(
|
||||
&mut self,
|
||||
packet_type: u8,
|
||||
packet: Bytes,
|
||||
read: &mut DynWebSocketRead,
|
||||
write: &dyn LockingWebSocketWrite,
|
||||
|
|
|
@ -56,6 +56,7 @@ impl ProtocolExtension for MotdProtocolExtension {
|
|||
|
||||
async fn handle_packet(
|
||||
&mut self,
|
||||
_: u8,
|
||||
_: Bytes,
|
||||
_: &mut DynWebSocketRead,
|
||||
_: &dyn LockingWebSocketWrite,
|
||||
|
|
|
@ -102,6 +102,7 @@ impl ProtocolExtension for PasswordProtocolExtension {
|
|||
|
||||
async fn handle_packet(
|
||||
&mut self,
|
||||
_: u8,
|
||||
_: Bytes,
|
||||
_: &mut DynWebSocketRead,
|
||||
_: &dyn LockingWebSocketWrite,
|
||||
|
|
|
@ -48,6 +48,7 @@ impl ProtocolExtension for UdpProtocolExtension {
|
|||
|
||||
async fn handle_packet(
|
||||
&mut self,
|
||||
_: u8,
|
||||
_: Bytes,
|
||||
_: &mut DynWebSocketRead,
|
||||
_: &dyn LockingWebSocketWrite,
|
||||
|
|
|
@ -189,7 +189,7 @@ impl<R: WebSocketRead + 'static, W: WebSocketWrite + 'static> MuxInner<R, W> {
|
|||
let (ch_tx, ch_rx) = mpsc::bounded(if self.role == Role::Server {
|
||||
self.buffer_size as usize
|
||||
} else {
|
||||
usize::MAX
|
||||
usize::MAX - 8
|
||||
});
|
||||
|
||||
let should_flow_control = self.tcp_extensions.contains(&stream_type.into());
|
||||
|
|
|
@ -572,6 +572,7 @@ impl<'a> Packet<'a> {
|
|||
{
|
||||
extension
|
||||
.handle_packet(
|
||||
packet_type,
|
||||
BytesMut::from(bytes).freeze(),
|
||||
DynWebSocketRead::from_mut(read),
|
||||
write,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue