Chat is a websocket based chat. (Written in rust btw)
There are 2 main parts in this repo:
- Server (located in the
chat_serverdirectory) - Client (located in the
chat_clientdirectory)
The server is written using axum (previously rocket), which uses tokio-tungstenite for websockets under the hood.
The client is a tui application written using ratatui for terminal drawing and tokio-tungstenite for websocket handling.
As of writing, the server doesn't support args or configs.
cargo run --bin chat_serverLaunch the tui and join the default room:
cargo run --bin chat_clientNote
The wollowing code snippets will simplify the cargo run bit to just chat_client
Launch the tui and join the room called not_default:
chat_client -r not_defaultDelete the log file and then launch the tui:
chat_client -cCheck the server status:
chat_client lsCheck the server status and display the users currently in the default room:
chat_client ls -uOr
chat_client ls --usersCheck the server and display the users in the room called something:
chat_client ls -ur something