summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorJomar Milan <jomarm@jomarm.com>2026-06-02 21:15:27 -0700
committerJomar Milan <jomarm@jomarm.com>2026-06-02 21:15:27 -0700
commitec2097b11f93ad968e171c0e961e0e06652ce44b (patch)
treed404d2b7a021b57e19d2f668ae463ff311b4a988 /src/main.rs
parenta2e55df0eeea9709175dd0a26c1e09bdaa60841a (diff)
Implement play websocket handshake
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/main.rs b/src/main.rs
index 32e5d58..b157b71 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,10 +1,11 @@
+mod play;
mod session;
mod template;
+use crate::play::handle_play;
use crate::session::{HandObject, Session};
use crate::template::{IndexTemplate, SessionTemplate};
use askama::Template;
-use axum::extract::ws::WebSocket;
use axum::extract::{Path, Query, State, WebSocketUpgrade};
use axum::http::{StatusCode, header};
use axum::response::{Html, IntoResponse, Response};
@@ -145,10 +146,3 @@ async fn update_hands(
async fn upgrade_play(ws: WebSocketUpgrade, State(state): State<Arc<AppState>>) -> Response {
ws.on_upgrade(|socket| handle_play(socket, state))
}
-
-#[allow(unused_variables)]
-async fn handle_play(mut socket: WebSocket, state: Arc<AppState>) {
- while let Some(msg) = socket.recv().await {
- todo!()
- }
-}