SFNUL Simple and Fast Network Utility library © binary1248 SFNUL is provided under the Mozilla Public License Version 2.0 (see LICENSE for details) 1. INSTALLING SFNUL requires a compiler with C++11 support. Not all features are used, however many newer features are used that might not be supported by all compilers even though they claim C++11 support. Your mileage may vary. Dependencies: - ASIO (standalone C++11 version) provided in extlibs - Botan provided in extlibs - http-parser provided in extlibs - SFML 2.x for the optional SFML synchronization example (http://sfml-dev.org/) ASIO is provided under the Boost Software License. Botan is provided under the Simplified BSD License. http-parser is provided under the MIT License. SFML is provided under the zlib License. The build system in use is CMake (http://cmake.org/). It's available for all major platforms. To build, perform the following steps: - cmake . - make install (as root) - On Linux: ldconfig (as root) 2. USING SFNUL IN OWN PROJECTS To use SFNUL in your projects, you have to link to the SFNUL library (see 1. for building). Also make sure that your compiler is able to find SFNUL's include directory. If you're using CMake for your project and you've properly installed SFNUL (see 1.), you can automate the process of finding SFNUL. At first copy the file cmake/FindSFNUL.cmake to your CMake's module directory. Then add the following to your project's CMakeLists.txt file: find_package( SFNUL REQUIRED ) include_directories( ${SFNUL_INCLUDE_DIR} ) add_executable( my_program ... ) target_link_libraries( my_program ... ${SFNUL_LIBRARY} ) In case CMake can't find your SFNUL installation, you can still specify the path manually by setting the SFNUL_ROOT CMake variable. Because SFNUL makes use of the operating system's networking subsystem, be sure to link the necessary networking libraries to your final application as well. 3. DOCUMENTATION You can find the API documentation in the doc sub-directory. Create it with Doxygen (http://www.stack.nl/~dimitri/doxygen/). 4. CONTACT The AUTHORS file lists contributors with contact information.
Simple and Fast Network Utility Library
Overview
You might also like...
Basic definitions and utility functions for GNSS raw measurement processing
gnss_comm Authors/Maintainers: CAO Shaozu (shaozu.cao AT gmail.com) The gnss_comm package contains basic definitions and utility functions for GNSS ra
sc-ble-bridge is a utility that for every connected Steam Controller creates a virtual one acting as a bridge between SC and Steam
sc-ble-bridge The main goal of this utility is to provide workaround for steam-for-linux issue which makes Valve's Steam Controller unusable in BLE mo
A utility to automate the installation, maintenance, and debugging of Asterisk/DAHDI, while integrating additional patches to provide the richest telephony experience
PhreakScript A utility to automate the installation, maintenance, and debugging of Asterisk/DAHDI, while integrating additional patches to provide the
xsnip - a minimal and convenient screenshot utility for X11
xsnip - a minimal and convenient screenshot utility for X11 Most screenshot utilities compatible with X are clumsy, use bloated toolkits, and often do
C++17 & C++ 20 error-handling and utility extensions.
C++ 17 & C++ 20 error-handling and utility extensions. Overview STX is a collection of libraries and utilities designed to make working with C++ easie
flashrom is a utility for detecting, reading, writing, verifying and erasing flash chips
flashrom is a utility for detecting, reading, writing, verifying and erasing flash chips
Sysmon event simulation utility which can be used to simulate the attacks to generate the Sysmon Event logs for testing the EDR detections and correlation rules by Blue teams.
SysmonSimulator SysmonSimulator is an Open source Windows event simulation utility created in C language, that can be used to simulate most of the att
JoyfulNoise Tiny Utility Board
JoyfulNoise Tiny Utility Board A versatile ATtiny85-powered Eurorack module in 4HP. License JoyfulNoise hardware and software is Open Source. The JNTU
Linux x86_64 Process Injection Utility | Manipulate Processes With Customized Payloads (beta)
K55 - Linux x86_64 Process Injection Utility (C++11) About K55 (pronounced: "kay fifty-five") The K55 payload injection tool is used for injecting x86
Comments
-
Switch away from tropicssl
It would appear that tropicssl is not really maintained. Last commit was apparently 2011 and it would seem critical to a security library to see it maintained. I suggest using openssl instead as it is maintained and most users will already have it installed anyway.
-
No byte-swap in member of struct
Considering the following situation: server.cpp :
struct A { int a; }; int main() { ... //connect, etc A a1; a1.a=42; int i1=42; sfn::Message msg1; msg1<<a1<<i1; //send msg1 ...
client.cpp :
struct A { int a; }; int main() { //connect, etc. sfn::Message msg1; A a2; int i2; //recieve msg1, msg1>>a2>>i2; std::cout<<a2.a<<std::endl; std::cout<<i2<<std::endl; ...
correct me if i misunderstood something, but wouldn't a2.a and i2 be different if the server's and the client's byte order are different?
-
Idea: could ´std::tuple´ and ´std::bitset´ be used for more efficient synchronizable data storage?
I'm a big fan of how easy to use your library is and wanted to share some thoughts about possible optimizations.
Instead of binding synchronizable fields at runtime, would it be possible to generate them at compile time using ´std::tuple´ and C++11 variadic templates?
I was thinking about something like this:
class Player : public SerializableObject< int, // x int, // y float, // health std::string // name > { ... } // The above struct would generate something like: class Player { std::bitset<4> dirtyFlags; std::tuple<int, int, float, std::string> fields; template<int I> void setAt(const typeAt<I>& x) { std::get<I>(fields) = x; dirtyFlags[I] = true; } ... }
Generating the data structure wouldn't be too difficult. Do you, however, think that serializing and synchronizing structures generated that way would be possible?
-
Update 3rd-party libraries
Currently the SFNUL is a not the best choice to pick, as the dependencies haven't been updated in a long time. Maybe it would be possible to get ASIO and http-parser to a more recent version, but the customization done to Botan seems hard to understand and reapply for newer versions.
Since Botan provides the secure TLS layer, it's critical that it's updated to the latest version to ensure that newly surfaced security issues have been fixed.
Would be great if you could put in some effort to get it update. Maybe Botan cloud also be evaluated for SFML?
A simple utility that cold patches dwm (uDWM.dll) in order to disable window rounded corners in Windows 11
Win11DisableRoundedCorners A simple utility that cold patches the Desktop Window Manager (uDWM.dll) in order to disable window rounded corners in Wind
A simple utility for loading custom firmware onto the PS5 camera, using libusb.
A simple utility for loading custom firmware onto the PS5 camera, using libusb.
Simple command-line program for sharing the display image on a local network.
XCast is a simple server/client command line program for sharing screen under X. With XCast you have the ability to either pull the display from a rem
A Native Binary Emulator Library and Utility
binmulator A Native Binary Emulator Library and Utility Most emulators for malware detection are written in Python and fail when certain emulated API
Utility for testing random and pseudorandom sequences, either as bytes or bit streams, reporting entropy, mean value, serial correlation, chi square, and Monte Carlo estimate of an value, serial correlation, chi square, and Monte Carlo estimate of π.
ENT — Fourmilab Random Sequence Tester The Fourmilab Random Sequence Tester, ent, applies various tests to sequences of bytes stored in files and repo
NIH Utility Library
libnih is a light-weight "standard library" of C functions to ease the development of other libraries and applications. Its goals are: * despite it
Utility Library for Imaging Systems
Overview ULIS is a rendering library written in C++. It is aimed at software rasterization and digital image processing. Official Github Repository Pr
A utility library to use/bootstrap Soracom Arc easily on ESP32 Arduino boards
soracom-arc-esp32-arduino A utility library to use/bootstrap Soracom Arc easily on ESP32 Arduino boards. Synopsis #include <SoracomArcESP32.h> #includ
Utility to install kexts, Frameworks and PrivateFrameworks in the System of macOS. For macOS Monterey 12 and Big Sur 11
Command-Line-SnapShot-Mounter Credit: chris1111 Apple This utility uses the macOS terminal Command Line SnapShot Mounter is an utility that allows you
Peregrine - A blazing fast language for the blazing fast world(WIP)
A Blazing-Fast Language for the Blazing-Fast world. The Peregrine Programming Language Peregrine is a Compiled, Systems Programming Language, currentl