Programming a Windows command line messaging program.
In this project I built a messaging program in C++ using Winsock 2. The aim of this project was to learn how sockets, IPV4 and IPV6 works.
Example of client (2 top windows) and the server console (bottom left) with the server performance.
- Handles both IPV4 and IPV6 IP address
- The clients and server use event polling to prevent blocking calls
- Close server via the
!closeServercommand from any clients - Clients can set a username
- Winsock 2
This project uses CMake v3.25 for building the solution.
- Download the repository
- In the root directory add a
build/folder - Via the terminal run the CMake command
cmake .. - If successful a file with the extension
.slnshould be created. Open this file via visual studio and build the solutionctrl + shift + Bthen pressf5to start the server. - To start a client in the solution explorer tab, right click on the 'MiniChatClient' project and click Debug -> Start new instance.
- Repeat step 5 for adding more clients
- Connect the clients to the server via the information shown on the server terminal