Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: JRuby 1.5.1
-
Fix Version/s: JRuby 1.7.0.pre1
-
Component/s: Extensions, Windows
-
Labels:None
-
Testcase included:yes
-
Number of attachments :
Description
Using "sim.rb" from http://groups.google.com/group/comp.lang.ruby/browse_thread/thread/a79b38dd94e23b3b/0847b57566c600cb?lnk=raot&fwc=2
ruby sim.rb r 3302 229.1.1.1 5000
works
jruby however reports:
C:\dev\ruby>D:\installs\jruby-1.5.1\bin\jruby sim.rb r 3302 229.1.1.1 5000
Run using bindata and win32-console
1
#<UDPSocket:0x3ca754>
sim.rb:85:in `initialize': Protocol not available - Protocol not available (Errno::ENOPROTOOPT)
The script in question is http://www.ruby-forum.com/attachment/4309/sim.rb; it requires 'bindata' gem.
I am changing the summary, because I believe that multicasting doesn't come into play when JRuby raises the error it does.
First: notice that, in JRuby on Windows, constantine, a.k.a. jnr-constants, Socket constants default to some wacky values for Socket::IN* and Socket::IPPROTO*.
Second: in RubyBasicSocket.setsockopt, JRuby raises this error if we do not get Socket::IPPROTO_TCP and Socket::TCP_NODELAY as arguments. I am not sure if this is the correct behavior. I'll have to look further.