Discussion:
[asio-users] [NEW] Beast: Open source HTTP + WebSockets library using Boost.Asio
Vinnie Falco
2016-05-17 16:18:14 UTC
Permalink
Introducing: "Beast"

This is a new library that implements the HTTP and WebSocket protocols
using Boost.Asio and a few other Boost tidbits. The interface was
designed based on the principle of "What Would Christopher Kohlhoff
Do?" That is to say, the library design is based on the principles and
design patterns found in Boost.Asio. Specifically, the signatures of
free functions and member functions try to match the signatures of
functions in Asio. In particular there is full support for the
extensible asynchronous model (for example, use coroutines or futures
as completions).

Here's a quick synopsis of what's in it:

http::message:
- class template modeling the HTTP message with customization points
to satisfy even the most tough-minded reviewer.

http::read
http::write
http::async_read
http::async_write
- Free functions to easily send and receive HTTP messages. Modeled to
work exactly like boost::asio free functions. Role-agnostic, build
clients or servers!

websocket::stream
- class template wrapping any asio sync or async stream. Implements
the WebSocket protocol including the initial handshake.

PLUS, a whole new set of tools for working with Asio such as:

buffer_cat: Efficiently concatenate multiple ConstBufferSequence objects
http://vinniefalco.github.io/beast/beast/ref/buffer_cat.html

basic_streambuf: An improved version of boost::asio::basic_streambuf
https://github.com/vinniefalco/Beast/blob/master/include/beast/core/basic_streambuf.hpp#L21

Examples:
- WebSocket echo servers
- HTTP servers for simple websites

"I've heard enough, show me example code!"
http://vinniefalco.github.io/beast/beast/intro/example.html

Main page, with links to GitHub repository, HTML documentation and benchmarks:
http://vinniefalco.github.io/

Give Beast a try today!

Feedback welcome, the author checks email and Issues on the GitHub
repository. This project has been submitted to the Boost incubator.

------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
asio-users mailing list
asio-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/asio-users
_______________________________________________
Using Asio? List your project at
http://think-async.com/Asio/WhoIsUsingAsio

Loading...