c++ websocket library
  • C++ 78.7%
  • JavaScript 17.3%
  • CMake 3.2%
  • HTML 0.8%
Find a file
Roland Conybeare c6eec3cd50
Some checks failed
build xo-callback + xo dependencies / build (push) Has been cancelled
Split 'xo-cmake/' into commit 'dc64cba29d'
git-subtree-dir: xo-cmake
git-subtree-mainline: 933c6bbbbba2763681038be4f885479b6cbaadf0
git-subtree-split: dc64cba29d
2026-05-31 10:18:25 -04:00
.github/workflows websock: initializer for lws_http_mount._unused[] with lws 4.0 2023-10-17 22:19:30 -04:00
cmake xo-cmake: setup to make share target available via cmake install 2026-02-27 19:38:53 +11:00
include/xo/websock xo-websock: bugfix: track xo::ref::rp -> xo::rp 2024-09-15 11:41:13 -05:00
src/websock use xo::bp instead of xo::ref::brw 2025-07-05 13:55:00 -05:00
utest implementation + compile as independent module 2023-10-17 16:07:33 -04:00
.gitignore build: streamline CMAKE_MODULE_PATH interaction 2024-03-15 19:42:04 -04:00
CMakeLists.txt xo-websock: build: update to use latest xo-cmake macros 2024-09-15 11:40:25 -05:00
README.md first commit 2023-10-17 16:06:45 -04:00

websock library

http library including websocket support. Built around the C-library libwebsocket

dependencies

build+install these first

  • xo-somelib [github.com/Rconybea/xo-somelib]

build + install

build

$ cd websock
$ mkdir build
$ cd build
$ INSTALL_PREFIX=/usr/local  # or wherever you prefer
$ cmake -DCMAKE_MODULE_PATH=${INSTALL_PREFIX}/share/cmake -DCMAKE_PREFIX_PATH=${INSTALL_PREFIX} -DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} ..
$ make
$ make install

(also see .github/workflows/main.yml)

build for unit test coverage

$ cd xo-websock
$ mkdir ccov
$ cd ccov
$ cmake -DCMAKE_MODULE_PATH=${INSTALL_PREFIX}/share/cmake  -DCMAKE_PREFIX_PATH=${INSTALL_PREFIX} -DCODE_COVERAGE=ON -DCMAKE_BUILD_TYPE=Debug ..

development

LSP support

LSP looks for compile commands in the root of the source tree; cmake creates them in the root of its build directory.

$ cd xo-websock
$ ln -s build/compile_commands.json

display cmake variables

  • -L list variables
  • -A include 'advanced' variables
  • -H include help text
$ cd websock/build
$ cmake -LAH