mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-04-02 10:45:30 +00:00
WIP: aquatic_ws: continue work on simplifying network code
This commit is contained in:
parent
91590858b9
commit
05844e9645
3 changed files with 66 additions and 93 deletions
|
|
@ -4,7 +4,7 @@ use std::io::{Read, Write};
|
|||
use hashbrown::HashMap;
|
||||
use mio::Token;
|
||||
use mio::net::TcpStream;
|
||||
use native_tls::TlsStream;
|
||||
use native_tls::{TlsStream, MidHandshakeTlsStream};
|
||||
use tungstenite::WebSocket;
|
||||
use tungstenite::handshake::{MidHandshake, server::ServerHandshake};
|
||||
|
||||
|
|
@ -78,9 +78,10 @@ pub struct EstablishedWs<S> {
|
|||
|
||||
|
||||
pub enum ConnectionStage {
|
||||
Stream(Stream),
|
||||
TlsMidHandshake(native_tls::MidHandshakeTlsStream<TcpStream>),
|
||||
WsHandshake(MidHandshake<ServerHandshake<Stream, DebugCallback>>),
|
||||
TcpStream(TcpStream),
|
||||
TlsStream(TlsStream<TcpStream>),
|
||||
TlsMidHandshake(MidHandshakeTlsStream<TcpStream>),
|
||||
WsMidHandshake(MidHandshake<ServerHandshake<Stream, DebugCallback>>),
|
||||
EstablishedWs(EstablishedWs<Stream>),
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue