refactor: extract auth handshake from crdt_sync/server.rs into handshake.rs
The 1680-line server.rs is split: - handshake.rs: perform_auth_handshake helper + close_with_auth_failed + auth tests + start_auth_listener / close_listener_auth_failed test helpers + AuthListenerResult enum - server.rs: crdt_sync_handler (now invokes perform_auth_handshake) + wait_for_sync_text + broadcast/e2e/keepalive tests Auth handshake (Steps 1-3 of the WebSocket handshake) is a self-contained sequence that takes &mut SplitSink + &mut SplitStream and returns Option<AuthMessage>. The caller observes None to mean the connection has already been closed with the appropriate close code. No behaviour change. All 63 crdt_sync tests pass; full suite green.
This commit is contained in:
@@ -61,6 +61,7 @@ pub const PONG_TIMEOUT_SECS: u64 = 60;
|
||||
mod auth;
|
||||
mod client;
|
||||
mod dispatch;
|
||||
mod handshake;
|
||||
mod server;
|
||||
mod wire;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user