Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot connect to websocket over HTTPS #112

Open
TMGMike opened this issue Jun 22, 2022 · 2 comments
Open

Cannot connect to websocket over HTTPS #112

TMGMike opened this issue Jun 22, 2022 · 2 comments

Comments

@TMGMike
Copy link

TMGMike commented Jun 22, 2022

I spent a few days preparing my WPF app for websocket connections, and I now can't go any further because I discovered the library can't connect to anything other than ws:// or wss:// (would've been nice for this to be documented somewhere 😞 )

What can I do about this? Surely there's some way around this?

This was the most recommended package for client connections, and looking at others on NuGet, they haven't been updated in years...

@BasieP
Copy link

BasieP commented Jun 28, 2022

This is kinda basic and got nothing to do with the library.
https is for http traffic, not websocket traffic. when you want to use secure websockets, use wss://

@TMGMike
Copy link
Author

TMGMike commented Sep 29, 2022

This is kinda basic and got nothing to do with the library. https is for http traffic, not websocket traffic. when you want to use secure websockets, use wss://

I am aware this is basic, and I'm aware of the "typical" uses of the protocols... However, the socket I was connecting into only documents https:// connections: https://dev.streamlabs.com/docs/socket-api
When connecting into this socket API using SocketIO in NodeJS, the https protocol is supported (as the example shows).

I was asking whether this library has support similar to that. Your suggestion of simply using wss:// is not helpful, as you said yourself they are nothing alike, so just replacing the protocol with wss:// is not going to work.

FWIW, I eventually managed to find someone that had managed to find the underlying websocket which wasn't documented, which meant decoding the data and parsing event types manually:
new Uri($"wss://sockets.streamlabs.com/socket.io/?token={token}&transport=websocket"

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

No branches or pull requests

2 participants