This is a library which implements RFC 6455, "The WebSocket Protocol".
The WebSockets::WebSocket
class implements the WebSocket protocol, in either client or server role.
This is a portable C++11 library which depends only on the C++11 compiler and standard library, so it should be supported on almost any platform. The following are recommended toolchains for popular platforms.
- Windows -- Visual Studio (Microsoft Visual C++)
- Linux -- clang or gcc
- MacOS -- Xcode (clang)
This library is not intended to stand alone. It is intended to be included in a larger solution which uses CMake to generate the build system and build applications which will link with the library.
There are two distinct steps in the build process:
- Generation of the build system, using CMake
- Compiling, linking, etc., using CMake-compatible toolchain
- CMake version 3.8 or newer
- C++11 toolchain compatible with CMake for your development platform (e.g. Visual Studio on Windows)
- Base64 - a library which implements encoding and decoding data using the Base64 algorithm, which is defined in RFC 4648.
- Hash - a library which implements various cryptographic hash and message digest functions.
- Http - a library which implements RFC 7230, "Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing".
- SystemAbstractions - a cross-platform adapter library for system services whose APIs vary from one operating system to another
- Utf8 - a library which implements RFC 3629, "UTF-8 (Unicode Transformation Format)".
Generate the build system using CMake from the solution root. For example:
mkdir build
cd build
cmake -G "Visual Studio 15 2017" -A "x64" ..
Either use CMake or your toolchain's IDE to build. For CMake:
cd build
cmake --build . --config Release