Improvements to increase code coverage:

* Don't include the test code in coverage reports
* Add test code for missing coverage

Other:

* Improve the README.md
* Fix warning in sha1_context
* Tidy up the examples use of namespaces
* Various fixes to documentation and javadocs
This commit is contained in:
Vinnie Falco
2016-05-04 17:27:50 -04:00
parent 231988622c
commit 133e7a3b16
49 changed files with 1054 additions and 447 deletions

View File

@@ -21,17 +21,15 @@ int main()
boost::asio::connect(sock,
r.resolve(boost::asio::ip::tcp::resolver::query{host, "80"}));
using namespace beast::websocket;
// WebSocket connect and send message using beast
stream<boost::asio::ip::tcp::socket&> ws(sock);
beast::websocket::stream<boost::asio::ip::tcp::socket&> ws(sock);
ws.handshake(host, "/");
ws.write(boost::asio::buffer("Hello, world!"));
// Receive WebSocket message, print and close using beast
beast::streambuf sb;
opcode op;
beast::websocket::opcode op;
ws.read(op, sb);
ws.close(close_code::normal);
ws.close(beast::websocket::close_code::normal);
std::cout << to_string(sb.data()) << "\n";
}