This is CLI Chat Messenger based on POSIX API from Linux OS. Do note that unlike other similar named projects, this project works like a normal messenger e.g just as Facebook messenger would work. Except that it uses Command Line Interface (CLI) instead of a Graphical User Interface(GUI).
- Sockets
- Multi-Threading
- Object Oriented Programming
- Queue Data Structure
If using the g++ compiler you can do:
g++ server.cpp -lpthread -o server
g++ client.cpp -lpthread -o client
- Start the server on 1 PC/Terminal.
./server
-
Find IP of the server's PC using ipconfig/ifconfig. Let's call it "serverIP".
-
Use IP of the server to start client in another PC/Terminal.
./client serverIP
Using the above method, you can start as many clients as you want on different PCs OR even on same PC but different Terminals.