Beast Logo

PrevUpHomeNext

Using WebSocket

The WebSocket Protocol enables two-way communication between a client running untrusted code in a controlled environment to a remote host that has opted-in to communications from that code. The protocol consists of an opening handshake followed by basic message framing, layered over TCP. The goal of this technology is to provide a mechanism for browser-based applications needing two-way communication with servers without relying on opening multiple HTTP connections.

Beast provides developers with a robust WebSocket implementation built on Boost.Asio with a consistent asynchronous model using a modern C++ approach.

[Note] Note

This documentation assumes familiarity with Boost.Asio and the protocol specification described in rfc6455. Sample code and identifiers appearing in this section is written as if these declarations are in effect:

#include <beast/websocket.hpp>
using namespace beast::websocket;

PrevUpHomeNext