Skip to content

Latest commit

 

History

10 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WindowsSocketWhisper – TCP & UDP Chat System

1. Project Overview

WindowsSocketWhisper demonstrates Windows-specific socket programming, showcasing both TCP (reliable) and UDP (fast) protocols.
Ideal for learning network programming, protocol differences, and real-time messaging systems.

  • Secure Authentication – Username/password validation
  • Dual Protocol Support – Compare TCP reliability vs UDP speed
  • Rich Console UI – Color-coded messages and organized display
  • File Transfer Capability – Send and receive files
  • Multi-Client Support – Handle concurrent users
  • Command History – Track and retrieve previous commands
  • Real-time Notifications – Join/leave alerts and status updates
  • Broadcast Messaging – UDP-only feature
  • Network Educational Value – Learn protocol behaviors

2. Tech Stack

  • Language: C++11+
  • Networking: Winsock2 (ws2_32.lib)
  • Compiler: GCC/MinGW recommended
  • Storage: Local userdata.txt for credentials

3. Project Structure

WindowsSocketWhisper/
│── TCP_Version/
│   ├── server.cpp
│   ├── client.cpp
│   └── userdata.txt
│── UDP_Version/
│   ├── server.cpp
│   ├── client.cpp
│   └── userdata.txt
│── README.md
│── .gitignore

4. Setup & Usage

cd TCP_Version or UDP_Version
g++ -std=c++11 -o server.exe server.cpp -lws2_32 -Wall
g++ -std=c++11 -o client.exe client.cpp -lws2_32 -Wall

5. Major Components

5.1 TCP Server

  • Connection-oriented, reliable message delivery
  • Handles authentication, multiple clients, file transfer
  • Thread-safe using CRITICAL_SECTION
  • Ports: 8080 (configurable)

5.2 TCP Client

  • Connects to TCP server
  • Handles authentication, messaging, file transfer
  • Maintains command history locally

5.3 UDP Server

  • Connectionless, fast broadcast messaging
  • Tracks connected client addresses
  • Ports: 8081 (configurable)

5.4 UDP Client

  • Sends/receives datagrams asynchronously
  • Updates user status and command history

6. Logging & Monitoring

  • Command history saved per user locally
  • Server console displays connection status, notifications
  • UDP: Broadcast join/leave alerts
  • TCP: Reliable message logging (in-memory or optional file output)

7. Learning Outcomes

  • Windows socket programming with TCP and UDP
  • Understanding protocol trade-offs: reliability vs speed
  • Multi-threaded server design
  • Real-time messaging and broadcast systems
  • File transfer over TCP/UDP

8. Limitations

  • Terminal-only interface
  • Max 10 concurrent clients (configurable)
  • No encryption (plaintext credentials/messages)
  • UDP messages not guaranteed delivery

9. Ethical & Legal Notice

  • Educational use only
  • Controlled testing environment
  • Unauthorized network use or malicious activity prohibited

10. Author & Contact

Name: Mohid Umer
Email: mohidumer112@gmail.com

WindowsSocketWhisper is a learning project for Windows network programming and TCP/UDP protocol experimentation. Feedback and collaboration are welcome.

About

A Windows-based TCP & UDP chat system with authentication, multi-client support, file transfer, and real-time messaging for learning socket programming and network communication concepts.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages