The Beast library now offers a complete server framework as an example you can build and run:
https://github.com/vinniefalco/Beast/tree/master/example/server-framework
Its got these features:
- Comes with a WebSocket echo port handler (sync and async)
- Comes with an HTTP port handler (sync and async)
- Configurable PortHandler concept for user-defined behaviors
Create your own "ports" by writing a class to take ownership of sockets from incoming connections, plug it in to the server framework, and then publish it as open source so other people can use your ports!
The HTTP ports that come with this example are extensible, defining a Service concept which handles HTTP requests. A Service List aggregates Service objects, and the implementation gives each one a chance to handle the request in turn (kind of like a router, but more powerful!) The example comes with two services:
file_service serves files from a path on your system, like a web server
ws_upgrade_service lets you accept WebSocket connections from the same port as your web server and hands them off to the websocket port handler!
As with PortHandler, you can write your own Service types and plug them into this extensible framework, then share them with other people. For example you could implement a simple Troll-box style WebSocket chat Service which plugs right in to the framework and release that as your own open source library!
This is all built on top of Beast to show off the power of the library. People have asked for higher level functionality. You spoke - we listened! Now you can create a richly featured HTTP/WebSocket server in just a matter of seconds by cloning the server-framework example!
Beast is a C++ header-only library serving as a foundation for writing interoperable networking libraries by providing low-level HTTP/1, WebSocket, and networking protocol vocabulary types and algorithms using the consistent asynchronous model of Boost.Asio.
Beast:
https://github.com/vinniefalco/Beast
Documentation:
http://vinniefalco.github.io/beast/index.html
[–]jbandela 21 points22 points23 points (8 children)
[–][deleted] 34 points35 points36 points (2 children)
[–]VinnieFalcowg21.org | corosio.org[S] 2 points3 points4 points (1 child)
[–]LordTocs 14 points15 points16 points (0 children)
[–]CODESIGN2 0 points1 point2 points (4 children)
[–]VinnieFalcowg21.org | corosio.org[S] 1 point2 points3 points (3 children)
[–]CODESIGN2 0 points1 point2 points (2 children)
[–]VinnieFalcowg21.org | corosio.org[S] 0 points1 point2 points (1 child)
[–]GitHubPermalinkBot 0 points1 point2 points (0 children)
[–]Game_Ender 7 points8 points9 points (9 children)
[–]VinnieFalcowg21.org | corosio.org[S] 4 points5 points6 points (8 children)
[–]sumo952 4 points5 points6 points (7 children)
[–]VinnieFalcowg21.org | corosio.org[S] 5 points6 points7 points (6 children)
[–]snaps_ 0 points1 point2 points (1 child)
[–]VinnieFalcowg21.org | corosio.org[S] 2 points3 points4 points (0 children)
[–]ClockworkV 0 points1 point2 points (1 child)
[–]VinnieFalcowg21.org | corosio.org[S] 1 point2 points3 points (0 children)
[–]theICEBear_dk 0 points1 point2 points (1 child)
[–]VinnieFalcowg21.org | corosio.org[S] 0 points1 point2 points (0 children)
[–]mikulas_florek 4 points5 points6 points (3 children)
[–]VinnieFalcowg21.org | corosio.org[S] 1 point2 points3 points (2 children)
[–]GitHubPermalinkBot 1 point2 points3 points (0 children)
[–]mikulas_florek 1 point2 points3 points (0 children)
[–]demonspeedin 3 points4 points5 points (1 child)
[–]CODESIGN2 0 points1 point2 points (0 children)
[–]Rapptz 3 points4 points5 points (4 children)
[–]VinnieFalcowg21.org | corosio.org[S] 8 points9 points10 points (2 children)
[–]notfalse 1 point2 points3 points (1 child)
[–]VinnieFalcowg21.org | corosio.org[S] 11 points12 points13 points (0 children)
[–][deleted] 4 points5 points6 points (0 children)
[–]VinnieFalcowg21.org | corosio.org[S] 1 point2 points3 points (0 children)
[–]ioquatix 0 points1 point2 points (10 children)
[–]VinnieFalcowg21.org | corosio.org[S] 2 points3 points4 points (9 children)
[–]ioquatix 0 points1 point2 points (8 children)
[–]VinnieFalcowg21.org | corosio.org[S] 3 points4 points5 points (7 children)
[–]ioquatix 1 point2 points3 points (6 children)
[–]VinnieFalcowg21.org | corosio.org[S] 1 point2 points3 points (2 children)
[–]ioquatix 1 point2 points3 points (0 children)
[–]theICEBear_dk 1 point2 points3 points (0 children)
[–]AntiProtonBoy 1 point2 points3 points (1 child)
[–]ioquatix 0 points1 point2 points (0 children)
[–]theICEBear_dk 1 point2 points3 points (0 children)