Skip to content


Subversion checkout URL

You can clone with
Download ZIP
The C++ Network Library Project -- cross-platform, standards compliant networking library.
C++ CMake Other

This branch is 3 commits ahead of glynos:master

Merge pull request #525 from zi0r/master

Add information on using FreeBSD port
latest commit 769e5c65a2
@deanberris deanberris authored
Failed to load latest commit information.
concurrency Fix libraries names
config/src/network Added config.hpp to project (similar to uri/config.hpp) for compiler …
contrib/http_examples Added transfer direction callback.
deps Make Asio as a submodule
doc Moved the HTTP examples to contrib/http_examples; moved libs/network/…
http Simplified the HTTP client, request and response classes.
logging s,cppnetlib,network,
message s,cppnetlib,network,
mime add runtime output directory
uri @ 9567e16 Use std::unique_ptr for pimpl idiom in HTTP client.
.clang-format Added .clang-format for source code formatting.
.gitignore Remove temporary CMake files from gitignore (use _build directory)
.gitmodules Make Asio as a submodule
.travis.yml Added .travis.yml
CMakeLists.txt Remove empty directory and empty CMakeLists.txt Updated thread pool documentation.
FindICU.cmake Fixed linker errors in OSX under macports
LICENSE_1_0.txt Initial import.
RATIONALE.txt Improvements as mentioned on the mailing list, cleanup
README.rst - Add information on using FreeBSD port
index.html Minor restructuring of docs; added html docs so that it can be viewed… We want to standardize the packaging across releases.


C++ Network Library


cpp-netlib is a collection of network related routines/implementations geared towards providing a robust cross-platform networking library. cpp-netlib offers the following implementations:

  • Common Message Type -- A generic message type which can be used to encapsulate and store message related information, used by all network implementations as the primary means of data exchange.
  • Network protocol message parsers -- A collection of parsers which generate message objects from strings.
  • Adapters and Wrappers -- A collection of Adapters and wrappers aimed towards making the message type STL friendly.
  • Network protocol client and server implementations -- A collection of network protocol implementations that include embeddable client and server types.

This library is released under the Boost Software License (please see or the accompanying LICENSE_1_0.txt file for the full text.

Downloading cpp-netlib

You can find official release packages of the library at:

Building and Installing

Configuring the submodules

The project contains submodules for some dependencies and some libraries. Once you have cloned cpp-netlib, you must update the submodules:

$ cd ~/cpp-netlib
$ git submodule init
$ git submodule update

Building with CMake

To build the libraries and run the tests with CMake, you will need to have CMake version 2.8.10 or higher installed appropriately in your system.

$ cmake --version
cmake version 2.8.10

Inside the cpp-netlib directory, you can issue the following statements to configure and generate the Makefiles, and build the tests:

$ cd ~/cpp-netlib-build # cmake is built out of source
$ cmake ~/cpp-netlib \ # we're assuming it's where cpp-netlib is
>       -DCMAKE_BUILD_TYPE=Debug     \
>       -DCMAKE_C_COMPILER=clang     \
>       -DCMAKE_CXX_COMPILER=clang++

Once CMake is done with generating the Makefiles and configuring the project, you can now build the tests and run them:

$ cd ~/cpp-netlib-build
$ make
$ make test

If for some reason some of the tests fail, you can send the files in Testing/Temporary/ as attachments to the cpp-netlib developers mailing list.

API documentation can be generated by running the following command:

$ cd ~/cpp-netlib-build
$ make doc

The HTML output can be found in the html subdirectory.

Running Tests

If you want to run the tests that come with cpp-netlib, there are a few things you will need. These are:

  • A compiler (GCC 4.7.x, Clang 2.8, MSVC 2012)
  • CMake [#]_
  • OpenSSL headers (optional)


This assumes that you have cpp-netlib at the top-level of
your home directory.


Installing from packages

FreeBSD users can use the ports tree to install cpp-netlib:
$ cd /usr/ports/devel/cpp-netlib && make install clean

Hacking on cpp-netlib

cpp-netlib is being developed with the git distributed SCM system. cpp-netlib is hosted on GitHub following the GitHub recommended practice of forking the repository and submitting pull requests to the source repository. You can read more about the forking process and submitting pull requests if you're not familiar with either process yet.

Because cpp-netlib is released under the Boost Software License it is recommended that any file you make changes to bear your copyright notice alongside the original authors' copyright notices on the file. Typically the copyright notices are at the top of each file in the project.

At the time of writing, there are no coding conventions being followed but if you write in the general style that is already existing in the project that would be greatly appreciated. Copious amounts of comments will be called out, but code that is not self-explanatory typically at least requires a rationale documentation in comments explaining "why" the code is written that way.

The main "upstream" repository and official release repository is maintained at It is recommended that forks and pull requests be submitted to the upstream repository so that patches and other implementations can be curated by the project administrators.

Contact and Support

In case you have any questions or would like to make feature requests, you can contact the development team through the developers mailing list or by filing issues at

You can reach the maintainers of the project through:

Dean Michael Berris (

Glyn Matthews (
Something went wrong with that request. Please try again.