Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

The C++ Network Library Project -- cross-platform, standards compliant networking library.

License

NotificationsYou must be signed in to change notification settings

cpp-netlib/cpp-netlib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

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

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

This library is released under the Boost Software License (please seehttp://boost.org/LICENSE_1_0.txt or the accompanying LICENSE_1_0.txt filefor the full text.

Downloading cpp-netlib

You can find official release packages of the library at:

http://github.com/cpp-netlib/cpp-netlib/downloads

Building and Installing

Since cpp-netlib is a header-only library, there is nothing to build. To installcpp-netlib, you can choose to copy the contents of theboost directory intoan existing Boost[1] distribution or to a different location. All that isrequired is for projects that use cpp-netlib when building, have the directorywhere cpp-netlib is installed as part of the include paths.

[1]http://www.boost.org/

The recommended installation procedure would be to follow the steps below:

# On Linux/Mac, consider the `$` character as the shell prompt$ sudo mkdir -p /usr/local/include/cpp-netlib$ sudo cp -r cpp-netlib/boost /usr/local/include/cpp-netlib

Now don't forget to add/usr/local/include/cpp-netlib in your project'scompiler include directories to start using cpp-netlib in your projects.

Running Tests

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

  • A compiler (GCC 4.x or Clang 2.8)
  • A build tool (CMake[2] recommended, Boost.Build also an option)
  • OpenSSL headers (optional with CMake, mandatory for Boost.Build)
  • Python 2.6

Note

This assumes that you have the cpp-netlib distribution packageunpacked somwhere in your home directory. This specifically assumes that youhave cpp-netlib at the toplevel of your home directory.

[2]http://www.cmake.org/

Building with CMake

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

$ cmake --versioncmake version 2.8.1

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

$ cd ~/cpp-netlib      # we're assuming it's where cpp-netlib is$ cmake -DCMAKE_BUILD_TYPE=Debug \>    -CMAKE_C_COMPILER=clang     \>    -CMAKE_CXX_COMPILER=clang++ \>    .

Note

This uses the source directory as the build directory as well. At thetime of this writing, cpp-netlib is meant to be tested in the same directorywhere the source files are, because of the way the tests depend on Pythonbeing installed and having access to Python scripts during the build.

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

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

If for some reason some of the tests fail, you can send the files inTesting/Temporary/ as attachments to the cpp-netlibdevelopers mailinglist.

Building with Boost.Build

If you don't already have Boost.Build set up on your system, follow the stepsindicated in the Boost Getting Started Guide[3] -- you will particularly wantto copy thebjam executable to a directory that is already in yourPATHso that you don't have to go hunting for it all the time. A good place to put itis in/usr/local/bin.

[3]http://www.boost.org/doc/libs/1_44_0/more/getting_started/index.html

Building and running the tests can be as simple as doing the following:

$ cd ~/cpp-netlib$ bjam

Doing this will already build all the tests and run them as they are built. Incase you encounter any problems and would like to report it to the developers,please do the following:

$ cd ~/cpp-netlib$ bjam 2>&1 >build-test.log

And then attach thebuild-test.log file to the email you will send to thecpp-netlibdevelopers mailing list.

Hacking on cpp-netlib

cpp-netlib is being developed with thegit distributed SCM system.cpp-netlib is hosted onGitHub following the GitHub recommended practice offorking the repository and submitting pull requests to the source repository.You can read more about theforking process and submittingpull requests ifyou're not familiar with either process yet.

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

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

The main "upstream" repository is the one hosted by the original maintainer ofthe project (Dean Michael Berris) athttp://github.com/mikhailberis/cpp-netlib.The "official" release repository is maintained athttp://github.com/cpp-netlib/cpp-netlib -- which is a fork of the upstreamrepository. It is recommended that forks be made against the upstream repostoryand pull requests be submitted against the upstream repository so that patchesand other implementations can be curated by the original maintainer.

Contact and Commercial Support

In case you have any questions or would like to make feature requests, you cancontact the development team through thedevelopers mailing listor by filing issues athttp://github.com/mikhailberis/cpp-netlib/issues.

You can reach the maintainers of the project through:

Dean Michael Berrismikhailberis@gmail.comGlyn MatthewsMike Dickey

At this time, paid commercial support is available for cpp-netlib being offeredby the maintainers. In case you have any questions, please feel free to contactany one of the maintainers above or anybody on the developers mailing list.

About

The C++ Network Library Project -- cross-platform, standards compliant networking library.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++55.9%
  • HTML33.7%
  • JavaScript5.3%
  • CSS1.6%
  • CMake1.6%
  • Python1.3%
  • Other0.6%

[8]ページ先頭

©2009-2025 Movatter.jp