making a mess

This commit is contained in:
Adam 2024-07-16 21:16:25 -04:00
parent c35b9604d1
commit 834de62ba0

View file

@ -11,6 +11,11 @@ use std::{net::SocketAddr, sync::Arc};
pub mod message_handler;
use crate::message_handler::*;
pub struct User {
name: String,
addr: SocketAddr,
}
fn greeting(state: &Arc<AppState>) -> String {
format!(
"{:#?} Card packs loaded\n\
@ -20,11 +25,6 @@ fn greeting(state: &Arc<AppState>) -> String {
)
}
pub struct User {
name: String,
addr: SocketAddr,
}
pub async fn websocket(stream: WebSocket, state: Arc<AppState>, who: User) {
// By splitting, we can send and receive at the same time.
let (mut sender, mut receiver) = stream.split();