Skip to content

A simple and robust chat application written in C, enabling real-time communication between multiple computers. Starts as a CLI-based application and evolves into a GUI-powered platform.

License

Notifications You must be signed in to change notification settings

SCCSMARTCODE/CChatApp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CChatApp

CChatApp is a lightweight chat application built from scratch in C. It supports real-time communication between multiple computers using a client-server architecture. The project begins as a Command-Line Interface (CLI) application and is designed to evolve into a GUI-based chat platform.

Features

  • Phase 1: Basic client-server messaging over TCP/IP.
  • Phase 2: Multi-client support with user identification.
  • Phase 3: Optional GUI integration using GTK or Qt.
  • Phase 4: Additional features like message encryption and file transfer.

Getting Started

Prerequisites

  • GCC or Clang compiler
  • Basic understanding of C programming
  • Knowledge of socket programming (helpful, but not mandatory)

Installation

  1. Clone the repository:
    git clone https://github.com/your-username/CChatApp.git
    cd CChatApp
  2. Compile the application:
    gcc socket_client/main.c utils/utils.c -o client -lpthread
    gcc socket_server/main.c utils/utils.c -o server -lpthread
  3. Run the server:
    ./server
  4. Run the client (on the same or another machine):
    ./client

Project Phases

Phase 1: CLI-Based Chat Application

  • Basic client-server communication
  • Support for sending and receiving messages
  • Error handling and user validation

Phase 2: Multi-Client Support

  • Threaded server to handle multiple clients
  • Broadcast messages to all connected clients
  • User disconnection handling

Phase 3: GUI Integration

  • Design a simple GUI using GTK or Qt
  • Add message input/output areas
  • Integrate GUI with networking logic

Phase 4: Advanced Features

  • Message encryption using OpenSSL
  • File transfer support
  • Chat themes and user preferences

Directory Structure

CChatApp/  
├── LICENSE
├── README.md
├── client
├── server
├── socket_client
│   ├── a.out
│   ├── client.h
│   └── main.c
├── socket_server
│   ├── main.c
│   └── server.h
└── utils
    ├── utils.c
    └── utils.h

Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository.
  2. Create a new branch:
    git checkout -b feature-name
  3. Commit your changes:
    git commit -m "Add feature-name"
  4. Push to the branch:
    git push origin feature-name
  5. Open a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Acknowledgments

  • Beej's Guide to Network Programming for socket programming resources.
  • The C programming community for their valuable tools and libraries.

About

A simple and robust chat application written in C, enabling real-time communication between multiple computers. Starts as a CLI-based application and evolves into a GUI-powered platform.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages