📝 Description
This project involves creating a command-line chat application inspired by Discord, focusing on client-server architecture and inter-process communication.
Global Server:
All users connect to a global server where they can communicate.
Commands are implemented and invoked using
/command arg
syntax.
Private Discussion Rooms:
Users can create private chat rooms with
/group create
.Invite others using
/group invite {group_id} {user}
.Leave a group with
/group quit
and rejoin with/group join {group_id}
.Delete a group with
/group destroy {group_id}
; only the creator can perform this action.
Navigation and Interface:
Navigation between the global server and private groups is facilitated using a graphical library in C for the command-line interface.
Users connect to the global server with
/connect
and disconnect using/disconnect
.
Technical Implementation:
Establishment of a classic server allowing multiple client connections.
Implementation of server forking to support simultaneous multi-communication without queues.
Exploration of
ncurses
for graphical display in the command-line interface.Functions to parse strings to determine if they are commands and execute the corresponding functions with arguments.
Display of messages from other users within the client interface.
Management of group-related functionalities and navigation between global and private servers.
🧠 What I learned with it
Through this project, I gained experience in:
Developing client-server applications with real-time interaction capabilities.
Implementing inter-process communication (IPC) mechanisms, particularly process forking.
Managing synchronization and concurrency in a multi-client environment.
Utilizing ncurses for creating text-based user interfaces in the command line.
Handling command parsing and execution within a chat application.
Designing and managing private and public chat rooms with appropriate user permissions.
Understanding the complexities of real-time systems and the importance of efficient resource management.