FC++  v0.9.0-9e9b65
FileCatalyst Fast File Transfers - C++ Library
Using FC++ on Ubuntu

The Ubuntu version of FC++ is built using GNU G++ as a 64-bit multi-threaded library. User applications written in C++ can then link against the FC++ library.

Building with the FC++ API

  • Your source code must do either of the following equivalent things:
#include <FileCatalyst.hpp>
or:
#include <FC.hpp>
  • Link against the FC++ library, fcpp.a.
  • Ensure you have OpenSSL (libssl.so) and PThread (libpthread.so) installed.
Warning
In August 2020, the build process for FC++ was modified to use vcpkg. This means that FC++ should now always build with the latest version of important libraries, such as Boost and OpenSSL. (In the past, some of these libraries had been fixed to specific versions which caused problems when important security updates were released.) Thus, some of the build and link instructions in this document may be slightly out-of-date. Please contact Unlimi-Tech support for the most recent instructions.

Tuning for Ubuntu

Modern Linux kernels place a hard limit on the size of socket receive and transmit buffers which applications may request. These maximum limits greatly impact the performance of FC++. When possible, it is suggested that the maximum socket buffer sizes be increased. The sizes are modified using /sys/proc/net/core/rmem_max and /sys/proc/net/core/wmem_max. This is typically done using one of the following methods:

  • call /sbin/sysctl (see the sysctl(8) man page for details)
  • modify /etc/sysctl.conf
  • create a text file called /etc/sysctl.d/60-filecatalyst.conf with content similar to:
    # Optimizations for FileCatalyst.
    #
    # If you change or add a new value, either reboot or tell sysctl to reload it like this:
    #
    # sudo sysctl --load /etc/sysctl.d/60-filecatalyst.conf
    # increase the maximum tx and rx socket buffer sizes from 200 KiB to 32 MiB each
    net.core.rmem_max = 33554432
    net.core.wmem_max = 33554432
Warning
Calling fc::Options::setSocketOptions() will have no effect unless /sys/proc/net/core/rmem_max and /sys/proc/net/core/wmem_max have also been modified. See the socket(7) man page for additional details on SO_RCVBUF and SO_SNDBUF.
FC.hpp
FileCatalyst.hpp