Skip to content

Commit 81eba65

Browse files
committed
Merge branch '0.7-devel' of git://github.com/mikhailberis/cpp-netlib into xmpp
2 parents d414e35 + fad2d06 commit 81eba65

File tree

147 files changed

+2656
-3399
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

147 files changed

+2656
-3399
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ Testing
88
build
99
_build
1010
bin
11+
*.gch
1112

Jamroot

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ use-project /boost : $(BOOST_ROOT) ;
1212

1313
using testing ;
1414

15+
build-project libs/network/build ;
1516
build-project libs/network/test ;
1617
build-project libs/mime/test ;
1718

README.rst

Lines changed: 192 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,192 @@
1+
C++ Network Library
2+
===================
3+
4+
Introduction
5+
------------
6+
7+
cpp-netlib is a collection of network related routines/implementations
8+
geared towards providing a robust cross-platform networking library.
9+
cpp-netlib offers the following implementations:
10+
11+
* Common Message Type -- A generic message type which can be used
12+
to encapsulate and store message related information, used by all
13+
network implementations as the primary means of data exchange.
14+
* Network protocol message parsers -- A collection of parsers which
15+
generate message objects from strings.
16+
* Adapters and Wrappers -- A collection of Adapters and wrappers aimed
17+
towards making the message type STL friendly.
18+
* Network protocol client and server implementations -- A collection
19+
of network protocol implementations that include embeddable client
20+
and server types.
21+
22+
This library is released under the Boost Software License (please see
23+
http://boost.org/LICENSE_1_0.txt or the accompanying LICENSE_1_0.txt file
24+
for the full text.
25+
26+
Downloading cpp-netlib
27+
----------------------
28+
29+
You can find official release packages of the library at::
30+
31+
http://github.com/cpp-netlib/cpp-netlib/downloads
32+
33+
Building and Installing
34+
-----------------------
35+
36+
Since cpp-netlib is a header-only library, there is nothing to build. To install
37+
cpp-netlib, you can choose to copy the contents of the ``boost`` directory into
38+
an existing Boost [#]_ distribution or to a different location. All that is
39+
required is for projects that use cpp-netlib when building, have the directory
40+
where cpp-netlib is installed as part of the include paths.
41+
42+
.. [#] http://www.boost.org/
43+
44+
The recommended installation procedure would be to follow the steps below::
45+
46+
# On Linux/Mac, consider the `$` character as the shell prompt
47+
$ sudo mkdir -p /usr/local/include/cpp-netlib
48+
$ sudo cp -r cpp-netlib/boost /usr/local/include/cpp-netlib
49+
50+
Now don't forget to add ``/usr/local/include/cpp-netlib`` in your project's
51+
compiler include directories to start using cpp-netlib in your projects.
52+
53+
Running Tests
54+
-------------
55+
56+
If you want to run the tests that come with cpp-netlib, there are a few things
57+
you will need. These are:
58+
59+
* A compiler (GCC 4.x or Clang 2.8)
60+
* A build tool (CMake [#]_ recommended, Boost.Build also an option)
61+
* OpenSSL headers (optional with CMake, mandatory for Boost.Build)
62+
* Python 2.6
63+
64+
.. note:: This assumes that you have the cpp-netlib distribution package
65+
unpacked somwhere in your home directory. This specifically assumes that you
66+
have cpp-netlib at the toplevel of your home directory.
67+
.. [#] http://www.cmake.org/
68+
69+
Building with CMake
70+
~~~~~~~~~~~~~~~~~~~
71+
72+
To build and run the tests with CMake, you will need to have CMake version 2.8
73+
or higher installed appropriately in your system.
74+
75+
::
76+
77+
$ cmake --version
78+
cmake version 2.8.1
79+
80+
Inside the cpp-netlib directory, you can issue the following statements to
81+
configure and generate the Makefiles, and build the tests::
82+
83+
$ cd ~/cpp-netlib # we're assuming it's where cpp-netlib is
84+
$ cmake -DCMAKE_BUILD_TYPE=Debug \
85+
> -CMAKE_C_COMPILER=clang \
86+
> -CMAKE_CXX_COMPILER=clang++ \
87+
> .
88+
89+
.. note:: This uses the source directory as the build directory as well. At the
90+
time of this writing, cpp-netlib is meant to be tested in the same directory
91+
where the source files are, because of the way the tests depend on Python
92+
being installed and having access to Python scripts during the build.
93+
94+
Once CMake is done with generating the Makefiles and configuring the project,
95+
you can now build the tests and run them::
96+
97+
$ cd ~/cpp-netlib
98+
$ make
99+
$ make test
100+
101+
If for some reason some of the tests fail, you can send the files in
102+
``Testing/Temporary/`` as attachments to the cpp-netlib `developers mailing
103+
list`_.
104+
105+
.. _`developers mailing list`: https://lists.sourceforge.net/lists/listinfo/cpp-netlib-devel
106+
107+
Building with Boost.Build
108+
~~~~~~~~~~~~~~~~~~~~~~~~~
109+
110+
If you don't already have Boost.Build set up on your system, follow the steps
111+
indicated in the Boost Getting Started Guide [#]_ -- you will particularly want
112+
to copy the ``bjam`` executable to a directory that is already in your ``PATH``
113+
so that you don't have to go hunting for it all the time. A good place to put it
114+
is in ``/usr/local/bin``.
115+
116+
.. [#] http://www.boost.org/doc/libs/1_44_0/more/getting_started/index.html
117+
118+
Building and running the tests can be as simple as doing the following::
119+
120+
$ cd ~/cpp-netlib
121+
$ bjam
122+
123+
Doing this will already build all the tests and run them as they are built. In
124+
case you encounter any problems and would like to report it to the developers,
125+
please do the following::
126+
127+
$ cd ~/cpp-netlib
128+
$ bjam 2>&1 >build-test.log
129+
130+
And then attach the ``build-test.log`` file to the email you will send to the
131+
cpp-netlib `developers mailing list`_.
132+
133+
.. _`developers mailing list`: https://lists.sourceforge.net/lists/listinfo/cpp-netlib-devel
134+
135+
Hacking on cpp-netlib
136+
---------------------
137+
138+
cpp-netlib is being developed with the git_ distributed SCM system.
139+
cpp-netlib is hosted on GitHub_ following the GitHub recommended practice of
140+
forking the repository and submitting pull requests to the source repository.
141+
You can read more about the forking_ process and submitting `pull requests`_ if
142+
you're not familiar with either process yet.
143+
144+
.. _git: http://git-scm.com/
145+
.. _GitHub: http://github.com/
146+
.. _forking: http://help.github.com/forking/
147+
.. _`pull requests`: http://help.github.com/pull-requests/
148+
149+
Because cpp-netlib is released under the `Boost Software License`_ it is
150+
recommended that any file you make changes to bear your copyright notice
151+
alongside the original authors' copyright notices on the file. Typically the
152+
copyright notices are at the top of each file in the project.
153+
154+
.. _`Boost Software License`: http://www.boost.org/LICENSE_1_0.txt
155+
156+
At the time of writing, there are no coding conventions being followed but if
157+
you write in the general style that is already existing in the project that
158+
would be greatly appreciated. Copious amounts of comments will be called out,
159+
but code that is not self-explanatory typically at least requires a rationale
160+
documentation in comments explaining "why" the code is written that way.
161+
162+
The main "upstream" repository is the one hosted by the original maintainer of
163+
the project (Dean Michael Berris) at http://github.com/mikhailberis/cpp-netlib.
164+
The "official" release repository is maintained at
165+
http://github.com/cpp-netlib/cpp-netlib -- which is a fork of the upstream
166+
repository. It is recommended that forks be made against the upstream repostory
167+
and pull requests be submitted against the upstream repository so that patches
168+
and other implementations can be curated by the original maintainer.
169+
170+
Contact and Commercial Support
171+
------------------------------
172+
173+
In case you have any questions or would like to make feature requests, you can
174+
contact the development team through the `developers mailing list`_
175+
or by filing issues at http://github.com/mikhailberis/cpp-netlib/issues.
176+
177+
.. _`developers mailing list`:
178+
https://lists.sourceforge.net/lists/listinfo/cpp-netlib-devel
179+
180+
You can reach the maintainers of the project through::
181+
182+
Dean Michael Berris
183+
mikhailberis@gmail.com
184+
185+
Glyn Matthews
186+
187+
Mike Dickey
188+
189+
At this time, paid commercial support is available for cpp-netlib being offered
190+
by the maintainers. In case you have any questions, please feel free to contact
191+
any one of the maintainers above or anybody on the developers mailing list.
192+

README.txt

Lines changed: 0 additions & 22 deletions
This file was deleted.

boost/network/include/http/server.hpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#ifndef BOOST_NETWORK_INCLUDE_HTTP_SERVER_HPP_
2+
#define BOOST_NETWORK_INCLUDE_HTTP_SERVER_HPP_
3+
4+
// Copyright 2010 Dean Michael Berris
5+
// Distributed under the Boost Software License, Version 1.0.
6+
// (See accompanying file LICENSE_1_0.txt or copy at
7+
// http://www.boost.org/LICENSE_1_0.txt)
8+
//
9+
// This is the modular include file for using the HTTP Client
10+
11+
#include <boost/network/protocol/http/server.hpp>
12+
13+
#endif

boost/network/message/directives.hpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,8 @@
1010
/** Include all the various directive headers.
1111
*/
1212

13+
#include <boost/network/message/directives/detail/string_directive.hpp>
1314
#include <boost/network/message/directives/header.hpp>
14-
#include <boost/network/message/directives/body.hpp>
15-
#include <boost/network/message/directives/source.hpp>
16-
#include <boost/network/message/directives/destination.hpp>
1715
#include <boost/network/message/directives/remove_header.hpp>
1816

1917
namespace boost { namespace network {
@@ -25,6 +23,10 @@ namespace boost { namespace network {
2523
return message_;
2624
}
2725

26+
BOOST_NETWORK_STRING_DIRECTIVE(source, source_, message.source(source_));
27+
BOOST_NETWORK_STRING_DIRECTIVE(destination, destination_, message.destination(destination_));
28+
BOOST_NETWORK_STRING_DIRECTIVE(body, body_, message.body(body_));
29+
2830
} // namespace network
2931

3032
} // namespace boost

boost/network/message/directives/body.hpp

Lines changed: 0 additions & 56 deletions
This file was deleted.

boost/network/message/directives/destination.hpp

Lines changed: 0 additions & 49 deletions
This file was deleted.

0 commit comments

Comments
 (0)