...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
Source code and build scripts for these programs are located in the example directory.
These HTTP clients submit a GET request to a server specified on the command line, and prints the resulting response. The crawl client asynchronously fetches the document root of the 10,000 top ranked domains, this may be used to evaluate robustness.
Description |
Source File |
Source File (using SSL) |
---|---|---|
HTTP, synchronous |
||
HTTP, asynchronous |
||
HTTP, coroutine |
||
HTTP crawl (asynchronous) |
These WebSocket clients connect to a server and send a message, then receive a message and print the response before disconnecting.
Description |
Source File |
Source File (using SSL) |
---|---|---|
WebSocket, synchronous |
||
WebSocket, asynchronous |
||
WebSocket, coroutine |
These HTTP servers deliver files from a root directory specified on the command line.
Description |
Source File |
Source File (using SSL) |
---|---|---|
HTTP, synchronous |
||
HTTP, asynchronous |
||
HTTP, coroutine |
||
HTTP, stackless coroutine |
||
HTTP, fast (optimized for speed) |
||
HTTP, small (optimized for space) |
||
HTTP, flex (plain + SSL) |
These WebSocket servers echo back any message received, keeping the session open until the client disconnects.
Description |
Source File |
Source File (using SSL) |
---|---|---|
WebSocket, synchronous |
||
WebSocket, asynchronous |
||
WebSocket, coroutine |
||
WebSocket, stackless coroutine |
||
WebSocket, fast (suited for benchmarks) |
These servers offer both HTTP and WebSocket services on the same port, and illustrate the implementation of advanced features.
Description |
Features |
Source File |
---|---|---|
Advanced |
|
|
Advanced, flex (plain + SSL) |
|
Some of the examples use one or more shared header files, they are listed here along with a description of their use:
Source File |
Description |
---|---|
This contains the detect SSL algorithm including the synchronous and asynchronous initiating functions, described in the documentation. It is used by the "flex" servers which support both plain and SSL sessions on the same port. |
|
This contains the root SSL certificates used in the SSL client examples. These certificates are used to verify the signatures of SSL certificates presented by remote servers. They represent a subset of the public keys usually installed as part of the operating system or browser, so they may not identify every possible server. |
|
This file contains a self-signed SSL certificate used by the SSL server examples. It has not been validated by a Certificate Authority ("CA") so connecting to an example HTTP server using a browser may generate security warnings. |
|
The |
Here are all of the example functions and classes presented throughout the documentation, they can be included and used in your program without modification
This program shows how to use Beast's network foundations to build a composable asynchronous initiation function with associated composed operation implementation. This is a complete, runnable version of the example described in Writing Composed Operations: Echo.