Skip to content

u-mar/TCP-Chat-Server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TCP Chat Server

A simple multi-client chat server written in Rust using std::net.
Each user connects via TCP, chooses a username, and can send messages to all participants or certain users in real time.


✨ Features

  • Multiple clients can connect simultaneously
  • Username prompt on connect
  • Broadcast messages to all connected users
  • Store chat history in memory (Vec<String>)
  • Direct messaging with @username
  • Add message formatting (timestamps, system messages)
  • Save chat history to a database and load
  • Add rooms/channels so users can join different chats
  • (Planned) WebSocket support for browser-based UI

🚀 Getting Started

Prerequisites

  • Rust (latest stable). Install via rustup.

Clone the repository

git clone https://github.com/u-mar/TCP-Chat-Server.git
cd TCP-Chat-Server

🛠 Tech Stack

  • Rust (standard library networking + threading)
  • Arc + Mutex for safe shared state
  • Telnet (for simple client testing)

🔮 Roadmap

  • Build a WebSocket version for a browser-based UI
  • Implement user authentication (login/register)
  • Add rooms/channels so users can join different chats
  • Support file sharing (images, docs, etc.)
  • Add encryption (TLS) for secure communication
  • Implement a moderation system (kick, ban, mute users)
  • Deploy server as a Docker container
  • Create a desktop client (with Rust + egui/iced)
  • Add mobile/web notifications for new messages

                       ❤️ Made with love by **Cumar**

About

this is tcp chat server based on rust

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages