Squashed 'src/beast/' changes from 1ab7a2f..c00cd37

c00cd37 Set version to 1.0.0-b23
f662e36 Travis CI improvements:
b05fa33 Fix message constructor and special members
b4722cc Add copy special members
420d1c7 Better logging in async echo server
149e3a2 Add file and line number to thrown exceptions
3e88b83 Tune websocket echo server for performance

git-subtree-dir: src/beast
git-subtree-split: c00cd37b8a441a92755658014fdde97d515ec7ed
This commit is contained in:
Vinnie Falco
2017-01-17 14:50:38 -05:00
parent af4fe24939
commit 7028579170
20 changed files with 221 additions and 85 deletions

View File

@@ -8,17 +8,27 @@
#include "websocket_async_echo_server.hpp"
#include "websocket_sync_echo_server.hpp"
#include <beast/test/sig_wait.hpp>
#include <iostream>
int main()
{
using endpoint_type = boost::asio::ip::tcp::endpoint;
using address_type = boost::asio::ip::address;
beast::websocket::async_echo_server s1(true, endpoint_type{
address_type::from_string("127.0.0.1"), 6000 }, 4);
try
{
boost::system::error_code ec;
beast::websocket::async_echo_server s1{nullptr, 1};
s1.open(true, endpoint_type{
address_type::from_string("127.0.0.1"), 6000 }, ec);
beast::websocket::sync_echo_server s2(true, endpoint_type{
address_type::from_string("127.0.0.1"), 6001 });
beast::websocket::sync_echo_server s2(true, endpoint_type{
address_type::from_string("127.0.0.1"), 6001 });
beast::test::sig_wait();
beast::test::sig_wait();
}
catch(std::exception const& e)
{
std::cout << "Error: " << e.what() << std::endl;
}
}