@@ -35,7 +35,7 @@ Handler function object.
35
35
There are two different Handler concepts, one concept for `Synchronous Servers `_
36
36
and another for `Asynchronous Servers `.
37
37
38
- The SynchronusHandler concept for `Synchronous Servers `_ is described by the
38
+ The SynchronousHandler concept for `Synchronous Servers `_ is described by the
39
39
following table:
40
40
41
41
---------------
@@ -145,7 +145,7 @@ API Documentation
145
145
The following sections assume that the following file has been included:
146
146
147
147
.. code-block :: c++
148
-
148
+
149
149
#include <boost/network/include/http/server.hpp>
150
150
151
151
And that the following typedef's have been put in place:
@@ -226,14 +226,14 @@ Constructor
226
226
To use the above supported named parameters, you'll have code that looks like the following:
227
227
228
228
.. code-block :: c++
229
-
229
+
230
230
using namespace boost::network: :http; // parameters are in this namespace
231
231
boost::asio: :io_service my_io_service;
232
232
boost::network::utils: :thread_pool pool(2);
233
233
handler handler_instance;
234
234
async_server<handler> instance(_address="0.0.0.0", _port="80", _handler=handler_instance,
235
235
_io_service=my_io_service, _thread_pool=pool,
236
- _reuse_address=true);
236
+ _reuse_address=true);
237
237
instance.run();
238
238
239
239
Public Members
@@ -270,8 +270,8 @@ helpful in certain simple situations.
270
270
271
271
``response = http_server::response::stock_reply(status, body) ``
272
272
Code like the above should go inside the handler's ``operator() `` overload.
273
- The body parameter is an ``std::string ``. The status parameter is any of
274
- the following values from the ``http_server::response `` enum
273
+ The body parameter is an ``std::string ``. The status parameter is any of
274
+ the following values from the ``http_server::response `` enum
275
275
``status_type ``:
276
276
277
277
.. code-block :: c++
@@ -313,7 +313,7 @@ which can be directly manipulated by the handler.
313
313
.. [# ] A header is a struct of type
314
314
``response_header<http::tags::http_server> ``. An instance always has the
315
315
members ``name `` and ``value `` both of which are of type ``string_type ``.
316
- .. [# ] ``string_type `` is
316
+ .. [# ] ``string_type `` is
317
317
``boost::network::string<http::tags::http_server>::type ``.
318
318
319
319
Asynchronous Servers
@@ -358,7 +358,7 @@ synchronous server implementation.
358
358
The general pattern for using the ``async_server `` template is shown below:
359
359
360
360
.. code-block :: c++
361
-
361
+
362
362
struct handler;
363
363
typedef boost::network::http: :async_server<handler> http_server;
364
364
@@ -367,7 +367,7 @@ The general pattern for using the ``async_server`` template is shown below:
367
367
http_server::request const & req,
368
368
http_server::connection_ptr connection
369
369
) {
370
- // handle the request here, and use the connection to
370
+ // handle the request here, and use the connection to
371
371
// either read more data or write data out to the client
372
372
}
373
373
};
0 commit comments