socketry / async-websocket

Asynchronous WebSocket client and server, supporting HTTP/1 and HTTP/2 for Ruby.
MIT License
166 stars 18 forks source link

Unable to establish connection on Windows 10. #44

Open vinnydiehl opened 1 year ago

vinnydiehl commented 1 year ago

On Windows 10 RubyInstaller 3.0.5, no code within my Async::WebSocket::Client.connect block is being run, the program just hangs.

On RubyInstaller 3.1.2, the situation is even worse- it crashes with the following error:

  0.0s     warn: Async::Task [oid=0x280] [ec=0x294] [pid=32436] [2022-12-13 00:36:46 -0500]
               | Task may have ended with unhandled exception.
               |   Errno::EBADF: Bad file descriptor
               |   → <internal:io> 63
               |     C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/io-event-1.1.4/lib/io/event/selector/select.rb 206

The exact same code run on WSL communicates with the websocket as expected.

Code and more information on my specific implementation here.

ioquatix commented 1 year ago

Windows support is a work in progress, but we are making progress.

If you are able to help with any of the above, before Dec 25, we will be able to support it in Ruby 3.2 - specifically we need to support as much non-blocking IO on Windows as possible.

Otherwise, I'd recommend just using WSL.