A command line based messenger app where you can add friends and chat with friends
Functionality implemented:
- server initialization with configuration file
- user registration "r"
- login "l"
- quit the program "exit"
- logout from the server "logout"
- client invitation command "i"
- client invitation acceptance command
- handling SIGINT signal
- readme file
The server is in the messenger_server folder. Client is in the messenger_client folder. to run the server, compile using the command "g++ -o server messenger_server.cpp" in the respective folder. To run the client, use the command "g++ -o client -pthread messenger_client.cpp" in the respective folder. I have implemented POSIX threads at the client side while I/O multiplexing with "select" at the server side. The server and client only work at localhost. The reason is that I could not find the global IP addresses of server or client. Hence, server is not available globally and outside entity cannot connect. The reason might be NAT settings.
In case the client side does not show any prompt on the terminal to follow, it is still implemented properly. So, if you type any supported commands like "i" for invitation, "ia" for accepting, it will work properly. I have implemented the "i" (to invite someone) command such that you first type "i" and then type the "friend username" and then the message. Same case for "ia" command.