This topic is primarily for Brad, or anyone else familiar with the Network API:
My main question is, what address does a WebSocket client connect to in order to establish a link with Cantabile’s Network Server? Context and background below…
I recently purchased a Stream Deck and see a lot of potential using it as a controller for Cantabile. My hope is to develop a custom application that acts as an interface between the Stream Deck and Cantabile, so the buttons can be customized based on the current song configuration. For example, button one could open the GUI for the first plugin in the first rack, and always show a specific graphic to represent whatever that plugin is in the current song.
The ClientWebSocket class can only connect using a URI that starts with “ws://” or “wss://”. All of the examples I can find regarding the Network/WebSocket API mention using “http://localhost:35007”. I can connect successfully using that address in Chrome - I get the built-in web interface. But, how do I connect using a WebSocket? I tried “ws://localhost:35007”, but the connection fails. Specifically, with this code:
_socket = new ClientWebSocket();
await _socket.ConnectAsync(new Uri(“wss://localhost:35007”), CancellationToken.None);
The 3rd line above is never reached - the connection is never established. Maybe I am going about this all wrong, but the code above is based on several examples I have found online for using the ClientWebSocket class.
I am open to suggestions on taking a completely different approach, but the WebSocket connection seems like the simplest, cleanest way to do this from within C#. I can easily process the JSON messages if only I can get them!
Any help greatly appreciated.