Saturn icon indicating copy to clipboard operation
Saturn copied to clipboard

Update FSharp.Control.Websockets to 0.3.0 to fix WebSockets

Open 64J0 opened this issue 1 year ago • 1 comments

Description:

With this PR, I'm updating the FSharp.Control.Websockets package version to 0.3.0 so we can use WebSockets again. Btw, this issue is currently blocking me with some code.

Related issues:

  • Close https://github.com/SaturnFramework/Saturn/issues/379

How to test:

# first, assert that the problem is real
git checkout main # make sure that this branch is updated
dotnet tool restore # we need paket
cd sample/ChannelsSample
dotnet run

# use some tool to test the websocket connection
# I'm using wscat, since it's easy to use
# https://github.com/websockets/wscat
wscat -c ws://localhost:8085/channel
# notice the error right next
Connected (press CTRL+C to quit)
Disconnected (code: 1006, reason: "")

# now test this branch code
git checkout fix-ws # assert that the code is updated
dotnet run
wscat -c ws://localhost:8085/channel

# assert that it's working fine, and the connection was correctly stablished

# =======================
# another option is to open the sample web page, going to localhost:8085
# and testing it there (paying attention to the server logs)
# you can use the following endpoints through the terminal:
curl localhost:8085/ping
curl localhost:8085/ping?message=hi

64J0 avatar Sep 03 '24 14:09 64J0

Seems related -> https://stackoverflow.com/questions/77943721/f-web-socket-with-saturn

64J0 avatar Sep 04 '24 16:09 64J0