# libwspo **Repository Path**: paul3rd/libwspo ## Basic Information - **Project Name**: libwspo - **Description**: libwspo -- A lightweight, zero-overhead C++23 WebSocket protocol only library. - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-02-27 - **Last Updated**: 2026-02-28 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # libwspo **A library for WebSocket Protocol Only** — A lightweight, zero-overhead C++23 WebSocket protocol library. ## Features - Full RFC 6455 WebSocket protocol implementation - Zero I/O dependency — pure protocol logic, bring your own transport - Compact data structures (16-byte frame header, same as C equivalent) - Hot-path functions fully inlined for maximum performance - PMR allocator support for user-controlled memory allocation - permessage-deflate compression extension (RFC 7692) - Cross-platform: Windows, Linux, macOS - C++23 (requires a C++23-capable compiler) - Ping/Pong is handled by the application layer (respond to `opcode::ping` with `opcode::pong`) ## Building ```bash cmake --preset cmake --build build/ --config Release ctest --test-dir build/ --config Release --output-on-failure ``` ## Integration ### CMake FetchContent ```cmake include(FetchContent) FetchContent_Declare(libwspo GIT_REPOSITORY https://gitee.com/paul3rd/libwspo.git GIT_TAG v0.1.0 ) FetchContent_MakeAvailable(libwspo) target_link_libraries(your_target PRIVATE libwspo::libwspo) ``` ### CMake find_package ```cmake find_package(libwspo REQUIRED) target_link_libraries(your_target PRIVATE libwspo::libwspo) ``` ## Quick Example ```cpp #include // Parse a frame header from raw bytes std::array raw = /* received from socket */; auto result = libwspo::parse_frame_header(raw); if (result) { auto& [consumed, header] = *result; // header.op, header.payload_length, header.fin(), header.masked() } ``` ## License MIT