Files
boost_beast/doc/2_examples.qbk

93 lines
2.5 KiB
Plaintext
Raw Normal View History

2016-09-25 11:19:51 -04:00
[/
2017-02-06 20:07:03 -05:00
Copyright (c) 2013-2017 Vinnie Falco (vinnie dot falco at gmail dot com)
2016-09-25 11:19:51 -04:00
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
]
2017-06-04 17:25:55 -07:00
[section:example Example Programs]
2016-09-25 11:19:51 -04:00
2017-06-11 09:59:13 -07:00
These complete programs are intended to quickly impress upon readers the
flavor of the library. Source code and build scripts for them are located
2016-09-25 11:19:51 -04:00
in the examples directory.
2017-06-04 17:25:55 -07:00
2016-09-25 11:19:51 -04:00
[heading HTTP GET]
2017-06-04 17:25:55 -07:00
Use HTTP to make a GET request to a website and print the response:
2017-06-11 09:59:13 -07:00
File: [repo_file examples/http_example.cpp]
2017-06-04 17:25:55 -07:00
2017-06-11 09:59:13 -07:00
[http_example_get]
2017-06-04 17:25:55 -07:00
2016-09-25 11:19:51 -04:00
[heading WebSocket]
Establish a WebSocket connection, send a message and receive the reply:
2017-06-04 17:25:55 -07:00
2017-06-11 09:59:13 -07:00
File: [repo_file examples/websocket_example.cpp]
2017-06-04 17:25:55 -07:00
2017-06-11 09:59:13 -07:00
[websocket_example_client_echo]
2016-09-25 11:19:51 -04:00
[heading WebSocket Echo Server]
This example demonstrates both synchronous and asynchronous
WebSocket server implementations.
2017-06-11 09:59:13 -07:00
* [repo_file examples/websocket_async_echo_server.hpp]
* [repo_file examples/websocket_sync_echo_server.hpp]
* [repo_file examples/websocket_echo.cpp]
2016-10-02 16:42:50 -04:00
[heading Secure WebSocket]
Establish a WebSocket connection over an encrypted TLS connection,
send a message and receive the reply. Requires OpenSSL to build.
2017-06-11 09:59:13 -07:00
* [repo_file examples/ssl/websocket_ssl_example.cpp]
2016-10-02 16:42:50 -04:00
2016-10-02 16:33:42 -04:00
[heading HTTPS GET]
This example demonstrates sending and receiving HTTP messages
over a TLS connection. Requires OpenSSL to build.
2017-06-11 09:59:13 -07:00
* [repo_file examples/ssl/http_ssl_example.cpp]
2016-10-02 16:33:42 -04:00
2016-09-25 11:19:51 -04:00
[heading HTTP Crawl]
This example retrieves the page at each of the most popular domains
as measured by Alexa.
2017-06-11 09:59:13 -07:00
* [repo_file examples/http_crawl.cpp]
2016-09-25 11:19:51 -04:00
[heading HTTP Server]
This example demonstrates both synchronous and asynchronous server
implementations. It also provides an example of implementing a [*Body]
type, in `file_body`.
2017-06-11 09:59:13 -07:00
* [repo_file examples/file_body.hpp]
* [repo_file examples/http_async_server.hpp]
* [repo_file examples/http_sync_server.hpp]
* [repo_file examples/http_server.cpp]
2016-09-25 11:19:51 -04:00
[heading Composed Operations]
This program shows how to use Beast's core foundations to build a
composable asynchronous initiation function with associated composed
operation implementation. This is a complete, runnable version of
the example described in the Core Foundations document section.
2017-06-11 09:59:13 -07:00
* [repo_file examples/echo_op.cpp]
[heading Documentation Samples]
2017-06-11 09:59:13 -07:00
Here are all of the example functions and classes presented
throughout the documentation, they can be included and used
in your program without modification
2016-09-25 11:19:51 -04:00
2017-06-11 09:59:13 -07:00
* [repo_file examples/doc_core_samples.hpp]
2016-09-25 11:19:51 -04:00
2017-06-11 09:59:13 -07:00
* [repo_file examples/doc_http_samples.hpp]
2016-09-25 11:19:51 -04:00
[endsect]