LiveOrDevTrying / WebsocketsSimple

WebsocketsSimple provides an easy-to-use and customizable Websocket Server and Websocket Client. The server is created using a TcpListener and upgrades a successful connection to a WebSocket. The server and client can be used for non-SSL or SSL connections and authentication (including client and server SSL certification validation) is provided for identifying the clients connected to your server. Both client and server are created in .NET Standard and use async await functionality.
Apache License 2.0
21 stars 2 forks source link

Websocket client - support URI containing a path #3

Closed rdewaele closed 2 years ago

rdewaele commented 2 years ago

I was considering this library for my use-case, but my connection URI contains a path (see https://datatracker.ietf.org/doc/html/rfc6455#section-3), which does not seem to be supported by this library.

Looking at https://github.com/LiveOrDevTrying/WebsocketsSimple/blob/master/WebsocketsSimple.Client/WebsocketClient.cs#L61-L63 the connection URI is always constructed from basic parts, with no support for a path.

Is this by design or are you open to supporting this use-case? Maybe I am missing something?

EDIT: I should also mention that for my use-case the OAuth2 access token is passed as a query parameter.

LiveOrDevTrying commented 2 years ago

Good feedback. I will add in a a parameter for the path and make a commit. Ty for feedback :)

LiveOrDevTrying commented 2 years ago

Hi @rdewaele , This change has been commit and packages are building right now. Please take a look and if you run into any other issues, let me know. Thanks for using WebsocketsSimple!