This is a simple Task Manager built using C++ socket programming, demonstrating client-server communication. The client allows users to log in with a username and manage their tasks, while the server processes and stores the data during the session.
- Real-time communication over TCP
- Multiple clients handled by server
- Clean and modular C++ code
- Uses standard Berkeley/POSIX sockets
- Easy to compile and run
- C++
- POSIX Sockets (Berkeley Sockets)
- Terminal / Command Line
server.cpp
– Server-side logic: handles client connections and task management.client.cpp
– Client-side logic: connects to the server and interacts with the user.
- C++ compiler (e.g.,
g++
) - Linux or UNIX-based system (or WSL on Windows)
- Terminal/console access
git clone https://github.com/your-username/tcp-chat-app.git
cd tcp-chat-app
To compile the server and client in Windows using executable
g++ -std=c++11 server.cpp -o server.exe -lws2_32
g++ -std=c++11 client.cpp -o client.exe -lws2_32
To compile the server and client in UNIX/mac
g++ server.cpp -o server
g++ client.cpp -o client
./server
./client
Upon connecting to the server, the client prompts the user to enter a username. After that, the available commands are displayed, and the user is welcomed into the task manager interface.
Connected to server.
Enter your username: user1
Commands:
- ADD priority|YYYY-MM-DD|description
- LIST
- LIST COMPLETED
- LIST ALL
- MARK <index>
- exit
> Welcome, user1!
The following commands can be used by clients to interact with the server:
Adds a new task with a specified priority, due date, and description.
- priority: Task urgency (
high
,medium
, orlow
) - YYYY-MM-DD: Task deadline in date format
- description: A short description of the task
Displays all current tasks maintained by the server.
Ends the current session and disconnects the client from the server.