ftz.Lyberta.net

Modern C++ goodness

ftz Networking

High level networking library

A library providing high level abstractions for networking.

The following protocols are implemented:

  • Simple Reliable Messaging
  • Semi-Reliable Realtime Messaging

Key features

  • Cross platform - written in pure ISO C++17 (+ #pragma once).
  • Header only - no need to build and worry about compiler settings.
  • Free software - released under the terms of GNU GPLv3 or any later version.

Dependencies

Compiler support

  • G++ 8 or newer with libstdc++

How to get

It is highly recommended to use Conan to install and use this library. To install Conan on APT-based distros you would typically do:

# apt install python-pip
$ pip install conan

Then add official ftz repository:

$ conan remote add ftz https://conan.ftz.lyberta.net

Then you need to follow a Conan tutorial to declare that your project depends on this library, for example, using conanfile.txt:

[requires]
ftzNetworking/Latest@Lyberta/Latest

Or using conanfile.py:

build_requires = "ftzNetworking/Latest@Lyberta/Latest"

The rest depends on your build system. In CMake you would do:

# Adding Conan dependencies.
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
conan_basic_setup(TARGETS)

# Adding example executable target.
add_executable(Example ...)

# Specifying libraries to link executable to.
target_link_libraries(Example PRIVATE CONAN_PKG::ftzNetworking)

After that in your source code you include files like this:

#include <ftz/Networking/SomeHeader.h>

To build your code, remember to execute conan install before calling cmake so your dependencies will be set correctly.

Source code

API reference

Manually packaging the library

Packaging dependencies:

  • Git
  • Conan

To install dependencies on Debian Testing you would invoke:

# apt install git python-pip
$ pip install conan

Clone the repository and switch into it:

$ git clone https://gitlab.com/ftz/networking.git
$ cd networking

Build the Conan package with your specified user and channel:

$ conan create . User/Channel