Skip to content

SpawnCycle/rs-chat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chat

About

Chat is a websocket based chat. (Written in rust btw)

There are 2 main parts in this repo:

  • Server (located in the chat_server directory)
  • Client (located in the chat_client directory)

Server

The server is written using axum (previously rocket), which uses tokio-tungstenite for websockets under the hood.

Client

The client is a tui application written using ratatui for terminal drawing and tokio-tungstenite for websocket handling.

Usage

Server

As of writing, the server doesn't support args or configs.

cargo run --bin chat_server

Client

Launch the tui and join the default room:

cargo run --bin chat_client

Note

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_default

Delete the log file and then launch the tui:

chat_client -c

Check the server status:

chat_client ls

Check the server status and display the users currently in the default room:

chat_client ls -u

Or

chat_client ls --users

Check the server and display the users in the room called something:

chat_client ls -ur something

Prerequisites

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages