This project, "winstests," is a C++ application that demonstrates network communication using the Tnet library on Windows. It includes both client and server components to showcase basic network operations. This README provides information on how to build, run, and understand the project.
Before building and running this project, ensure that you have the following prerequisites installed on your system:
- CMake (Version 3.26 or higher)
- A C++ compiler that supports C++17 (e.g., GCC, Clang, Visual C++)
- Windows Operating System (this project relies on the
ws2_32
library, which is specific to Windows)
Follow these steps to build the "winstests" project:
- Clone the repository to your local machine.
git clone https://github.com/Anthony4m/winstests.git
cd winstests
- Create a build directory and navigate to it.
mkdir build
cd build
- Use CMake to generate the project files based on the provided
CMakeLists.txt
.
cmake ..
- Build the project using your preferred build tool (e.g.,
make
on Unix-like systems or Visual Studio on Windows).
On Unix-like systems:
make
On Windows (using Visual Studio or another IDE generated by CMake):
Open the generated solution file and build the project.
After successfully building the project, you can run the client and server components. Here's how:
-
Open a terminal or command prompt.
-
Navigate to the build directory (if you are not already there).
cd build
- Run the server executable.
./server_exe
The server will start and listen for incoming connections.
-
Open another terminal or command prompt.
-
Navigate to the build directory (if you are not already there).
cd build
- Run the client executable.
./client_exe
The client will connect to the server, and you should see the communication between the client and server in the respective terminal/command prompt windows.
The project is organized as follows:
CMakeLists.txt
: The CMake configuration file for the project.Tnet/
: A directory containing the Tnet library source code and header files.client/
: The client source code.server/
: The server source code.
This project depends on the following components:
ws2_32
: The Windows Socket Library, used for socket communication on Windows.Tnet
: A custom library provided in the project, which handles network communication.
For further details about the Tnet library, please refer to the documentation provided in the Tnet
directory.
This project is distributed under the [insert_license_here] License. See the LICENSE file for more information.
Special thanks to the contributors and maintainers of the Tnet library.
For any questions, issues, or feedback related to this project, please contact [Your Name] at [[email protected]].