Skip to content

Commit fb9d8fa

Browse files
committed
Merge pull request #612 from deanberris/release-documentation
Release documentation
2 parents 80c05e4 + e58cdad commit fb9d8fa

File tree

100 files changed

+12988
-3299
lines changed

Some content is hidden

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

100 files changed

+12988
-3299
lines changed

libs/network/doc/html/.buildinfo

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Sphinx build info version 1
22
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
3-
config: ae0de19b7b7891744d7373f4a9b6c125
4-
tags: fbb0d17656682115ca4d033fb2f83ba1
3+
config: adbe6ea7ac2e69d5b593dfb1e312603d
4+
tags: 645f666f9bcd5a90fca523b33c5a78b7
-3.7 KB
Binary file not shown.
Binary file not shown.
-6.83 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
-12.8 KB
Binary file not shown.
-5.21 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
-21.4 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
-59.6 KB
Binary file not shown.
-13.1 KB
Binary file not shown.

libs/network/doc/html/_sources/examples/http/hello_world_server.txt

+31-23
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ simple response to any HTTP request.
1919
.. code-block:: c++
2020

2121
#include <boost/network/protocol/http/server.hpp>
22-
#include <string>
2322
#include <iostream>
2423

2524
namespace http = boost::network::http;
@@ -28,16 +27,19 @@ simple response to any HTTP request.
2827
typedef http::server<hello_world> server;
2928

3029
struct hello_world {
31-
void operator() (server::request const &request,
32-
server::response &response) {
33-
std::string ip = source(request);
34-
response = server::response::stock_reply(
35-
server::response::ok, std::string("Hello, ") + ip + "!");
30+
void operator()(server::request const &request, server::response &response) {
31+
server::string_type ip = source(request);
32+
unsigned int port = request.source_port;
33+
std::ostringstream data;
34+
data << "Hello, " << ip << ':' << port << '!';
35+
response = server::response::stock_reply(server::response::ok, data.str());
36+
}
37+
void log(const server::string_type& message) {
38+
std::cerr << "ERROR: " << message << std::endl;
3639
}
3740
};
3841

39-
int
40-
main(int argc, char * argv[]) {
42+
int main(int argc, char *argv[]) {
4143

4244
if (argc != 3) {
4345
std::cerr << "Usage: " << argv[0] << " address port" << std::endl;
@@ -46,7 +48,8 @@ simple response to any HTTP request.
4648

4749
try {
4850
hello_world handler;
49-
server server_(argv[1], argv[2], handler);
51+
server::options options(handler);
52+
server server_(options.address(argv[1]).port(argv[2]));
5053
server_.run();
5154
}
5255
catch (std::exception &e) {
@@ -100,34 +103,39 @@ This header contains all the code needed to develop an HTTP server with
100103
typedef http::server<hello_world> server;
101104

102105
struct hello_world {
103-
void operator () (server::request const &request,
104-
server::response &response) {
105-
std::string ip = source(request);
106-
response = server::response::stock_reply(
107-
server::response::ok, std::string("Hello, ") + ip + "!");
106+
void operator()(server::request const &request, server::response &response) {
107+
server::string_type ip = source(request);
108+
unsigned int port = request.source_port;
109+
std::ostringstream data;
110+
data << "Hello, " << ip << ':' << port << '!';
111+
response = server::response::stock_reply(server::response::ok, data.str());
112+
}
113+
void log(const server::string_type& message) {
114+
std::cerr << "ERROR: " << message << std::endl;
108115
}
109116
};
110117

111-
``hello_world`` is a functor class which handles HTTP requests. All
112-
the operator does here is return an HTTP response with HTTP code 200
113-
and the body ``"Hello, <ip>!"``. The ``<ip>`` in this case would be
114-
the IP address of the client that made the request.
118+
``hello_world`` is a functor class which handles HTTP requests.
119+
All the operator does here is return an HTTP response with HTTP code 200
120+
and the body ``"Hello, <ip>:<port>!"``. The ``<ip>`` in this case would be
121+
the IP address of the client that made the request and ``<port>`` the clients port.
115122

116123
There are a number of pre-defined stock replies differentiated by
117124
status code with configurable bodies.
118-
119125
All the supported enumeration values for the response status codes can be found
120126
in ``boost/network/protocol/http/impl/response.ipp``.
121127

122128
.. code-block:: c++
123129

124130
hello_world handler;
125-
server server_(argv[1], argv[2], handler);
131+
server::options options(handler);
132+
server server_(options.address(argv[1]).port(argv[2]));
126133
server_.run();
127134

128-
The first two arguments to the ``server`` constructor are the host and
129-
the port on which the server will listen. The third argument is the
130-
the handler object defined previously.
135+
The ``server`` constructor requires an object of the ``options`` class,
136+
this object stores all needed options, especially the host and
137+
the port on which the server will listen.
138+
The ``options`` constructor's single argument is the handler object defined previously.
131139

132140
.. note:: In this example, the server is specifically made to be single-threaded.
133141
In a multi-threaded server, you would invoke the ``hello_world::run`` member

libs/network/doc/html/_sources/examples/http/twitter_search.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ The code
6464
`rapidjson`_, a header-only library that is released under
6565
the `MIT License`_.
6666

67-
.. _`rapidjson`: http://code.google.com/p/rapidjson/
67+
.. _`rapidjson`: https://github.com/miloyip/rapidjson
6868
.. _`MIT License`: http://www.opensource.org/licenses/mit-license.php
6969

7070
Building and running ``twitter_search``

libs/network/doc/html/_sources/reference/http_client.txt

+18
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ asynchronous.
2525
As of 0.11 the `Synchronous Clients`_ are now *DEPRECATED* and will be removed
2626
in subsequent releases.
2727

28+
In 0.12.x the `Synchronous Clients`_ have been removed.
29+
2830
Features
2931
--------
3032

@@ -473,3 +475,19 @@ to create a function object.
473475

474476
The ``BOOST_NETWORK_HTTP_BODY_CALLBACK`` macro is defined in
475477
``boost/network/protocol/http/client/macros.hpp``.
478+
479+
Generated Documentation
480+
-----------------------
481+
482+
.. doxygenclass:: boost::network::http::client_options
483+
:project: cppnetlib
484+
:members:
485+
:undoc-members:
486+
487+
.. doxygenclass:: boost::network::http::basic_client
488+
:project: cppnetlib
489+
:members:
490+
:undoc-members:
491+
492+
.. doxygentypedef:: boost::network::http::client
493+
:project: cppnetlib

libs/network/doc/html/_sources/whats_new.txt

+21
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,27 @@
44
What's New
55
************
66

7+
:mod:`cpp-netlib` 0.12
8+
----------------------
9+
10+
* Added a code of conduct.
11+
* Add TLS SNI hostname support in the HTTP Client options.
12+
* Changes based on Coverity reports.
13+
* Replace std::bind with lambdas.
14+
* Use std::shared_ptr instead of boost::shared_ptr.
15+
* Use standalone Asio instead of Boost.Asio.
16+
* No Boost library (shared or static) dependencies.
17+
* Use doxygen for documentation, integrated with Breathe to Sphinx.
18+
* Require C++11 for builds, removes support for non-C++11 compilers.
19+
* Update documentation for hello_world_server
20+
* Use googletest for tests
21+
* Fix XCode-generated debug binaries caused by URI parser complexity
22+
* Remove synchronous client implementation.
23+
* Remove support for connection keepalive (only supported in synchronous client).
24+
* Disable SSLv3 by default.
25+
* Use sanitisers in continuous integration (address and thread sanitiser).
26+
* Update minimum Boost to 1.57. Always use shared libs from Boost.
27+
728
:mod:`cpp-netlib` 0.11
829
----------------------
930

Binary file not shown.
Binary file not shown.

libs/network/doc/html/_static/basic.css

+68-6
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
* Sphinx stylesheet -- basic theme.
66
*
7-
* :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS.
7+
* :copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS.
88
* :license: BSD, see LICENSE for details.
99
*
1010
*/
@@ -197,7 +197,10 @@ h3:hover > a.headerlink,
197197
h4:hover > a.headerlink,
198198
h5:hover > a.headerlink,
199199
h6:hover > a.headerlink,
200-
dt:hover > a.headerlink {
200+
dt:hover > a.headerlink,
201+
caption:hover > a.headerlink,
202+
p.caption:hover > a.headerlink,
203+
div.code-block-caption:hover > a.headerlink {
201204
visibility: visible;
202205
}
203206

@@ -314,6 +317,13 @@ table.docutils {
314317
border-collapse: collapse;
315318
}
316319

320+
table caption span.caption-number {
321+
font-style: italic;
322+
}
323+
324+
table caption span.caption-text {
325+
}
326+
317327
table.docutils td, table.docutils th {
318328
padding: 1px 8px 1px 5px;
319329
border-top: 0;
@@ -344,6 +354,25 @@ table.citation td {
344354
border-bottom: none;
345355
}
346356

357+
/* -- figures --------------------------------------------------------------- */
358+
359+
div.figure {
360+
margin: 0.5em;
361+
padding: 0.5em;
362+
}
363+
364+
div.figure p.caption {
365+
padding: 0.3em;
366+
}
367+
368+
div.figure p.caption span.caption-number {
369+
font-style: italic;
370+
}
371+
372+
div.figure p.caption span.caption-text {
373+
}
374+
375+
347376
/* -- other body styles ----------------------------------------------------- */
348377

349378
ol.arabic {
@@ -406,6 +435,10 @@ dl.glossary dt {
406435
font-size: 1.3em;
407436
}
408437

438+
.sig-paren {
439+
font-size: larger;
440+
}
441+
409442
.versionmodified {
410443
font-style: italic;
411444
}
@@ -471,22 +504,51 @@ table.highlighttable td {
471504
padding: 0 0.5em 0 0.5em;
472505
}
473506

474-
tt.descname {
507+
div.code-block-caption {
508+
padding: 2px 5px;
509+
font-size: small;
510+
}
511+
512+
div.code-block-caption code {
513+
background-color: transparent;
514+
}
515+
516+
div.code-block-caption + div > div.highlight > pre {
517+
margin-top: 0;
518+
}
519+
520+
div.code-block-caption span.caption-number {
521+
padding: 0.1em 0.3em;
522+
font-style: italic;
523+
}
524+
525+
div.code-block-caption span.caption-text {
526+
}
527+
528+
div.literal-block-wrapper {
529+
padding: 1em 1em 0;
530+
}
531+
532+
div.literal-block-wrapper div.highlight {
533+
margin: 0;
534+
}
535+
536+
code.descname {
475537
background-color: transparent;
476538
font-weight: bold;
477539
font-size: 1.2em;
478540
}
479541

480-
tt.descclassname {
542+
code.descclassname {
481543
background-color: transparent;
482544
}
483545

484-
tt.xref, a tt {
546+
code.xref, a code {
485547
background-color: transparent;
486548
font-weight: bold;
487549
}
488550

489-
h1 tt, h2 tt, h3 tt, h4 tt, h5 tt, h6 tt {
551+
h1 code, h2 code, h3 code, h4 code, h5 code, h6 code {
490552
background-color: transparent;
491553
}
492554

-13.1 KB
Binary file not shown.

0 commit comments

Comments
 (0)