2017-05-28 19:49:41 -07:00
|
|
|
[/
|
|
|
|
|
Copyright (c) 2013-2017 Vinnie Falco (vinnie dot falco at gmail dot com)
|
|
|
|
|
|
|
|
|
|
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)
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
[section:overview Introduction]
|
|
|
|
|
|
2017-06-04 17:25:55 -07:00
|
|
|
[important
|
2017-06-08 22:03:58 -07:00
|
|
|
Beast is a cross-platform, header-only C++11 library for
|
|
|
|
|
[*low-level HTTP/1, WebSocket, and network protocol] programming
|
|
|
|
|
using the consistent asynchronous model of __Asio__. Beast is
|
|
|
|
|
not an HTTP client or HTTP server, but it can be used to build
|
2017-06-11 09:59:13 -07:00
|
|
|
those things. It is a foundation for writing interoperable
|
|
|
|
|
libraries by providing HTTP vocabulary types and algorithms. The
|
|
|
|
|
examples show how client and server applications might be built.
|
2017-06-04 17:25:55 -07:00
|
|
|
]
|
|
|
|
|
|
2017-06-07 16:30:49 -07:00
|
|
|
This library is designed for:
|
2017-05-28 19:49:41 -07:00
|
|
|
|
2017-06-11 09:59:13 -07:00
|
|
|
* [*Symmetry:] Algorithms are role-agnostic; build clients, servers, or both.
|
2017-05-28 19:49:41 -07:00
|
|
|
|
2017-06-07 16:30:49 -07:00
|
|
|
* [*Ease of Use:] __Asio__ users will immediately understand Beast.
|
2017-05-28 19:49:41 -07:00
|
|
|
|
2017-06-07 16:30:49 -07:00
|
|
|
* [*Flexibility:] Users make the important decisions such as buffer or
|
2017-05-28 19:49:41 -07:00
|
|
|
thread management.
|
|
|
|
|
|
2017-06-07 16:30:49 -07:00
|
|
|
* [*Performance:] Build applications handling thousands of connections or more.
|
2017-05-28 19:49:41 -07:00
|
|
|
|
2017-06-11 09:59:13 -07:00
|
|
|
* [*Basis for Further Abstraction.] Components are well-suited for building upon.
|
2017-05-28 19:49:41 -07:00
|
|
|
|
2017-06-07 16:30:49 -07:00
|
|
|
[heading Audience]
|
2017-05-28 19:49:41 -07:00
|
|
|
|
2017-06-07 16:30:49 -07:00
|
|
|
Beast is for network programmers who have some familiarity with
|
|
|
|
|
__Asio__. In particular, users who wish to write asynchronous programs
|
|
|
|
|
with Beast should already know how to use Asio sockets and streams,
|
|
|
|
|
and should know how to create concurrent network programs using
|
|
|
|
|
Asio callbacks or coroutines.
|
2017-05-28 19:49:41 -07:00
|
|
|
|
2017-06-07 16:30:49 -07:00
|
|
|
[heading Motivation]
|
2017-05-28 19:49:41 -07:00
|
|
|
|
2017-06-07 16:30:49 -07:00
|
|
|
An absence of high quality C++ network protocol libraries has led
|
|
|
|
|
to a patchwork of open-source solutions lacking suitable conciseness
|
2017-06-11 09:59:13 -07:00
|
|
|
and expressive power for standardization. Part of this problem is a
|
|
|
|
|
lack of common C++ networking interfaces. This is changing soon with
|
|
|
|
|
the Networking Technical Specification (__N4588__): a uniform interface
|
|
|
|
|
on track to become standardized. This technical specification is modeled
|
|
|
|
|
closely after Boost.Asio.
|
2017-06-07 16:30:49 -07:00
|
|
|
The HTTP and WebSocket protocols drive most of the World Wide Web.
|
|
|
|
|
Every web browser implements these protocols to load webpages and
|
|
|
|
|
to enable client side programs (often written in JavaScript) to
|
|
|
|
|
communicate interactively. C++ benefits greatly from having a
|
|
|
|
|
standardized implementation of these protocols.
|
|
|
|
|
|
|
|
|
|
[note
|
2017-06-11 09:59:13 -07:00
|
|
|
The Beast roadmap includes a port to the networking
|
|
|
|
|
interface based on __N4588__.
|
2017-06-07 16:30:49 -07:00
|
|
|
]
|
2017-05-28 19:49:41 -07:00
|
|
|
|
2017-06-07 16:30:49 -07:00
|
|
|
[heading Requirements]
|
2017-05-28 19:49:41 -07:00
|
|
|
|
2017-06-07 16:30:49 -07:00
|
|
|
Beast requires:
|
2017-05-28 19:49:41 -07:00
|
|
|
|
2017-06-07 16:30:49 -07:00
|
|
|
* [*C++11:] Robust support for most language features.
|
|
|
|
|
* [*Boost:] Boost.Asio and some other parts of Boost.
|
|
|
|
|
* [*OpenSSL:] Optional, for using TLS/Secure sockets.
|
2017-05-28 19:49:41 -07:00
|
|
|
|
2017-06-07 16:30:49 -07:00
|
|
|
[note Supported compilers: msvc-14+, gcc 4.8+, clang 3.6+]
|
2017-05-28 19:49:41 -07:00
|
|
|
|
2017-06-07 16:30:49 -07:00
|
|
|
This library is [*header-only]. To link a program using Beast
|
|
|
|
|
successfully, add the
|
|
|
|
|
[@http://www.boost.org/libs/system/doc/reference.html Boost.System]
|
|
|
|
|
library to the list of linked libraries. If you use coroutines
|
|
|
|
|
you'll also need the
|
|
|
|
|
[@http://www.boost.org/libs/coroutine/doc/html/index.html Boost.Coroutine]
|
|
|
|
|
library. Please visit the
|
|
|
|
|
[@http://www.boost.org/doc/ Boost documentation]
|
|
|
|
|
for instructions on how to do this for your particular build system.
|
|
|
|
|
|
|
|
|
|
[note
|
|
|
|
|
Beast does not compile using the
|
|
|
|
|
[@https://github.com/chriskohlhoff/asio stand-alone Asio],
|
|
|
|
|
since it relies on other Boost parts. There are no immediate
|
|
|
|
|
plans to offer a version that works with stand-alone Asio.
|
|
|
|
|
]
|
2017-05-28 19:49:41 -07:00
|
|
|
|
|
|
|
|
[heading Credits]
|
|
|
|
|
|
|
|
|
|
Boost.Asio is the inspiration behind which all of the interfaces and
|
|
|
|
|
implementation strategies are built. Some parts of the documentation are
|
|
|
|
|
written to closely resemble the wording and presentation of Boost.Asio
|
2017-06-07 16:30:49 -07:00
|
|
|
documentation. Credit goes to
|
|
|
|
|
[@https://github.com/chriskohlhoff Christopher Kohlhoff]
|
|
|
|
|
for his wonderful Asio library and the ideas in __N4588__ which power Beast.
|
2017-05-28 19:49:41 -07:00
|
|
|
|
2017-06-04 17:25:55 -07:00
|
|
|
Beast would not be possible without the support of
|
|
|
|
|
[@https://www.ripple.com Ripple]
|
|
|
|
|
during the library's early development, or the ideas, time and patience
|
2017-05-28 19:49:41 -07:00
|
|
|
contributed by
|
2017-06-04 17:25:55 -07:00
|
|
|
[@https://github.com/JoelKatz David Schwartz],
|
|
|
|
|
[@https://github.com/ximinez Edward Hennis],
|
2017-05-28 19:49:41 -07:00
|
|
|
[@https://github.com/howardhinnant Howard Hinnant],
|
2017-06-04 17:25:55 -07:00
|
|
|
[@https://github.com/miguelportilla Miguel Portilla],
|
|
|
|
|
[@https://github.com/nbougalis Nik Bougalis],
|
|
|
|
|
[@https://github.com/seelabs Scott Determan],
|
2017-06-07 16:30:49 -07:00
|
|
|
[@https://github.com/scottschurr Scott Schurr],
|
2017-06-04 17:25:55 -07:00
|
|
|
Many thanks to
|
|
|
|
|
[@https://github.com/K-ballo Agustín Bergé],
|
2017-06-03 18:40:28 -07:00
|
|
|
[@http://www.boost.org/users/people/glen_fernandes.html Glen Fernandes],
|
2017-05-28 19:49:41 -07:00
|
|
|
and
|
2017-06-07 16:30:49 -07:00
|
|
|
[@https://github.com/pdimov Peter Dimov]
|
2017-06-04 17:25:55 -07:00
|
|
|
for tirelessly answering questions on
|
|
|
|
|
[@https://cpplang.slack.com/ Cpplang-Slack].
|
2017-05-28 19:49:41 -07:00
|
|
|
|
|
|
|
|
[endsect]
|