Skip to content

Improve network stack#876

Open
jcelerier wants to merge 6 commits into
masterfrom
feature/remove-websocketpp
Open

Improve network stack#876
jcelerier wants to merge 6 commits into
masterfrom
feature/remove-websocketpp

Conversation

@jcelerier
Copy link
Copy Markdown
Member

@jcelerier jcelerier commented Mar 24, 2026

  • make sure all tests pass.
  • ipv6
  • TLS support
  • emscripten WS back-end
  • fix boost.json requiring linking on windows ?

OSCQuery publication / exploration examples seem to work fine and are compatible with the previous version.

@jcelerier jcelerier changed the title feature/remove websocketpp Improve network stack Mar 24, 2026
@jcelerier
Copy link
Copy Markdown
Member Author

jcelerier commented Mar 24, 2026

@x37v if you want to review / test this version with your stack. I need to do a bit more testing but we now have:

  • a much more modern (and consistently maintained) websocket backend, unlike websocketpp which has been abandoned for years: one commit in the last five years.
  • I tried adding ipv6 support wherever it was relevant - things work locally but so far I only tested this part under linux, need to test on windows and mac, also with various clients such as ESP32
  • the websocket implementation for oscquery is more flexible and also now supports using [socket.io](https://socket.io/ as backend) (@ogauthiersat @blueyeti) ; this opens interesting use cases with the "rooms" concept of socket.io.

@ogauthiersat
Copy link
Copy Markdown

@jcelerier I managed to build this branch into my score dev environment. However, I had to comment out all calls to boost::asio::ip::v6_only and disable vst/vst3/clap plugins that were not finding websocket_simple_client.

/home/ogauthier/git/github.com/ossia/score/3rdparty/libossia/src/ossia/protocols/socketio/socketio_server.cpp:472:42: error: no member named 'v6_only' in namespace 'boost::asio::ip'
  472 |   m_acceptor.set_option(boost::asio::ip::v6_only(false), ec);
/home/ogauthier/git/github.com/ossia/score/src/clappuppet/clappuppet.cpp:190:15: error: no type named 'websocket_simple_client' in namespace 'ossia::net'; did you mean 'websocket_simple_client_beast'?
  190 |   ossia::net::websocket_simple_client socket{{.url = "ws://127.0.0.1:37589"}, ctx};

I tested OSCQuery device, gives the same results under this branch or with release 3.8.1 :

  • Add OSCQuery device pointing at host ws://127.0.0.1:9999
  • OSCQuery device appears empty
  • Right-click QSCQuery device, Refresh namespace
  • OSCQuery device is populated normally
  • Add String process
  • String process does not appear in QSCQuery device tree
  • Right-click QSCQuery device, Refresh namespace
  • String process is available in OSCQuery tree, and modify value works

I confirm that user agent is different in the websocket setup header :

HTTP/1.1 101 Switching Protocols
Upgrade: websocket
Connection: Upgrade
Sec-WebSocket-Accept: WHdzoMgsjebbUf6MTfY4iCsB6aQ=
Server: Boost.Beast/359

3.8.1 :

HTTP/1.1 101 Switching Protocols
Connection: Upgrade
Sec-WebSocket-Accept: RNBbeBhCRzVA8/FAE9I48Lo7LWA=
Server: WebSocket++/0.8.3-dev
Upgrade: websocket

Is there a way to test socket.io from Score at the moment ?

@x37v
Copy link
Copy Markdown
Contributor

x37v commented Mar 25, 2026

@jcelerier sorry for the slow response, pretty busy with the latest release and various tasks around that but I will get to this.

@jcelerier
Copy link
Copy Markdown
Member Author

thanks for the review @ogauthiersat ! and no worries @x37v, the branch still needs a fair bit of polishing ::)

@x37v
Copy link
Copy Markdown
Contributor

x37v commented May 7, 2026

I haven't tested my application yet but I have successfully built libossia with my conan 1.x based setup adapted to this branch. There was one small issue building, yield.hpp wasn't found, I've included a patch below that resolves that:

0001-install-add-yield.hpp-to-installed-headers.patch

@x37v
Copy link
Copy Markdown
Contributor

x37v commented May 7, 2026

I'm seeing an unexpected character at the end of the JSON from the OSCQuery HTTP endpoint, looks like a NUL ?

xnor@xnor-m3-macbook-12160 /tmp % wget wget http://localhost:5678/rnbo/info/target_id
--2026-05-07 09:10:45--  http://wget/
Resolving wget (wget)... failed: nodename nor servname provided, or not known.
wget: unable to resolve host address ‘wget’
--2026-05-07 09:10:45--  http://localhost:5678/rnbo/info/target_id
Resolving localhost (localhost)... ::1, 127.0.0.1
Connecting to localhost (localhost)|::1|:5678... connected.
HTTP request sent, awaiting response... 200 OK
Length: 128 [application/json]
Saving to: ‘target_id’

target_id                                100%[==================================================================================>]     128  --.-KB/s    in 0s

2026-05-07 09:10:45 (1.13 MB/s) - ‘target_id’ saved [128/128]

FINISHED --2026-05-07 09:10:45--
Total wall clock time: 0.5s
Downloaded: 1 files, 128 in 0s (1.13 MB/s)
xnor@xnor-m3-macbook-12160 /tmp % cat target_id
{"FULL_PATH":"/rnbo/info/target_id","TYPE":"s","VALUE":"x86_64-Darwin-AppleClang-15.0.0.15000309","ACCESS":1,"CLIPMODE":"none"}%
xnor@xnor-m3-macbook-12160 /tmp % xxd target_id
00000000: 7b22 4655 4c4c 5f50 4154 4822 3a22 2f72  {"FULL_PATH":"/r
00000010: 6e62 6f2f 696e 666f 2f74 6172 6765 745f  nbo/info/target_
00000020: 6964 222c 2254 5950 4522 3a22 7322 2c22  id","TYPE":"s","
00000030: 5641 4c55 4522 3a22 7838 365f 3634 2d44  VALUE":"x86_64-D
00000040: 6172 7769 6e2d 4170 706c 6543 6c61 6e67  arwin-AppleClang
00000050: 2d31 352e 302e 302e 3135 3030 3033 3039  -15.0.0.15000309
00000060: 222c 2241 4343 4553 5322 3a31 2c22 434c  ","ACCESS":1,"CL
00000070: 4950 4d4f 4445 223a 226e 6f6e 6522 7d00  IPMODE":"none"}.

@x37v
Copy link
Copy Markdown
Contributor

x37v commented May 7, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants