/Saturnity

TCP/UDP network library for an Epitech Project (R-Type)

Primary LanguageC++MIT LicenseMIT

Contributors Forks Stargazers Issues MIT License Latest Release


Logo

Saturnity

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
  1. About The Project
  2. Getting Started
  3. Documentation
  4. Usage
  5. Contributing
  6. License
  7. Authors

About The Project

Product Name Screen Shot

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.

(back to top)

Built With

  • CPP
  • CMake
  • CLion

(back to top)

Getting Started

Prerequisites

  • CMake
  • C++20

Installation

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 a cmake 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)

(back to top)

Documentation

The documentation of this project can be found at:

Usage

See the examples in the source code documentation or the project documentation.

(back to top)

Contributing

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.

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Authors

alwyn974
alwyn974

ChatDo
ChatDo