A messenger-like chatting application in which clients can exchange messages with each other. There are two modes of chatting:
- Private Mode - clients can talk to each other privately.
- Public Mode - clients can exchange messages with anyone on the server.
There is also a login system which makes sure to identify each user.
The project has used the windows api of socket programming - Winsock2
library. Therefore, the project can only be compiled to windows machines that support this library. Also, make sure to link the object file with winsock modules.
The project is divided into 2 independent parts - the client and the server. The CLIENTS/
directory contains the code which should run on the client machine, while the SERVERS/
directory contains the code which should run on the server.
You can create as many copies of clients as you want.
- CLIENT.c - contains the client code.
- header.h - contains necessary headers and definitions used in project.
All servers need to be running at the same time in order to serve the client(s).
- MAIN_SERVER.c - the server responsible for login session of client(s).
- PRIVATE_SERVER.c - the server responsible for private conversations of clients with each other.
- PUBLIC_SERVER.c - the server responsible for public group chats of clients.
- header.h - contains necessary headers and definitions used in project.
The conversations and user data are stored in text and binaryfiles. See the report for more details.
- Book : Hands-on Network Programming with C, Lewis Van Winkle, www.packt.com
December, 2020
- github : @saad0510
- email : k200161@nu.edu.pk or ayyansaad46@gmail.com