Saturnity is a C++ library to handle network communication between a client and a server.
Explore the source code docs »
Explore the project docs »
Report Bug
·
Request Feature
Table of Contents
Saturnity is a C++ library to handle network communication between a client and a server.
Saturnity provide some abstraction to the user to handle the network communication.
You have a TCP and UDP server and client implementation.
You can easily create a server and a client and communicate with them using packets.
- CMake
- C++20
You can install Saturnity using the release package.
Warning It's not recommanded to use the release package, it's better to use the CMake installation method.
You can also install Saturnity with CMake:
- You will need to create a
FindSaturnity.cmake
file in your project, create it in acmake
directory, and add the following lines:
cmake_minimum_required(VERSION 3.17)
Include(FetchContent)
if (NOT ${LIBRARY_NAME}_FIND_QUIETLY)
set(FETCHCONTENT_QUIET OFF)
endif ()
if (NOT Saturnity_FOUND)
FetchContent_Declare(
Saturnity
GIT_REPOSITORY https://github.com/alwyn974/Saturnity.git
GIT_TAG v1.0.1.7
GIT_SHALLOW 1 # Only fetch the head commit
)
FetchContent_MakeAvailable(Saturnity)
FetchContent_GetProperties(Saturnity)
message(STATUS "Saturnity is available now")
endif ()
- You will need to add the following lines in your CMakeLists.txt file:
# Make project-provided Find modules available
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
find_package(Saturnity REQUIRED)
target_link_libraries(${PROJECT_NAME} Saturnity::Saturnity)
Or you can use it as submodule:
- Clone the repo
git submodule add https://github.com/alwyn974/Saturnity library/Saturnity
- Add the following lines in your CMakeLists.txt file:
add_subdirectory(library/Saturnity)
The documentation of this project can be found at:
- Source code documentation: https://alwyn974.github.io/Saturntiy
- Project documentation: https://alwyn974-rtype.gitbook.io/saturnity
See the examples in the source code documentation or the project documentation.
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
Read the contributing guide to learn how to contribute to the project.
Distributed under the MIT License. See LICENSE.txt for more information.
alwyn974 |
ChatDo |