async fn handle_client_msg(
    id: &str,
    msg: Message,
    clients: &data_types::SafeClients,
    sessions: &data_types::SafeSessions,
    game_states: &data_types::SafeGameStates,
    game_dict: &data_types::SafeGameDictionary,
) {
    //======================================================
    // Ensure the Message Parses to String
    //======================================================
    let message = match msg.to_str() {
        Ok(v) => v,
        Err(_) => {
            eprintln!("[warning] websocket message: '{:?}' was not handled", msg);
            return;
        }
    };

    match message {
        //======================================================
        // ignore pings
        //======================================================
        "ping" | "ping\n" => {
            println!("[event] ignoring ping...");
        }
        //======================================================
        // Game Session Related Events
        //======================================================
        _ => {
            game_engine::handle_event(id, message, clients, sessions, game_states, game_dict).await;
        }
    }
}
/// Handle messages from an open receiving websocket

Handle messages from an open receiving websocket
Handle messages from an open receiving websocket
async fn handle_client_msg(
    id: &str,
    msg: Message,
    clients: &data_types::SafeClients,
    sessions: &data_types::SafeSessions,
    game_states: &data_types::SafeGameStates,
    game_dict: &data_types::SafeGameDictionary,
) {
    //======================================================
    // Ensure the Message Parses to String
    //======================================================
    let message = match msg.to_str() {
        Ok(v) => v,
        Err(_) => {
            eprintln!("[warning] websocket message: '{:?}' was not handled", msg);
            return;
        }
    };
    match message {
        //======================================================
        // ignore pings
        //======================================================
        "ping" | "ping\n" => {
            println!("[event] ignoring ping...");
        }
        //======================================================
        // Game Session Related Events
        //======================================================
        _ => {
            game_engine::handle_event(id, message, clients, sessions, game_states, game_dict).await;
        }
    }
}
async fn handle_client_msg ( id : & str , msg : Message , clients : & data_types :: SafeClients , sessions : & data_types :: SafeSessions , game_states : & data_types :: SafeGameStates , game_dict : & data_types :: SafeGameDictionary , ) { //======================================================
 // Ensure the Message Parses to String
 //======================================================
 let message = match msg . to_str ( ) { Ok ( v ) => v , Err ( _ ) => { eprintln ! ( " " msg ) ; return ; } } ; match message { //======================================================
 // ignore pings
 //======================================================
 " " | " \n " => { println ! ( " " ) ; } //======================================================
 // Game Session Related Events
 //======================================================
 _ => { game_engine :: handle_event ( id , message , clients , sessions , game_states , game_dict ) . await ; } } }
Handle messages from an open receiving websocket
Handle messages from an open receiving websocket
id
&str
msg
Message
clients
&data_types::SafeClients
sessions
&data_types::SafeSessions
game_states
&data_types::SafeGameStates
game_dict
&data_types::SafeGameDictionary
id
&str
msg
Message
clients
&data_types::SafeClients
sessions
&data_types::SafeSessions
game_states
&data_types::SafeGameStates
game_dict
&data_types::SafeGameDictionary