Project

General

Profile

Actions

Bug #1323

closed

Sockets broken on windows

Added by cfis (Charlie Savage) about 12 years ago. Updated almost 10 years ago.

Status:
Closed
Priority:
Normal
Target version:
ruby -v:
ruby 1.9.2dev (2009-03-29) [i386-mswin32_90]
Backport:
[ruby-core:23051]

Description

=begin
Ruby built with VC2008. All the socket tests fail.

ruby socket\test_socket.rb

1) Error:
test_accept_loop(TestSocket):
NoMethodError: undefined method each' for nil:NilClass
socket/test_socket.rb:202:in
test_accept_loop'

2) Error:
test_accept_loop_multi_port(TestSocket):
NoMethodError: undefined method each' for nil:NilClass
socket/test_socket.rb:222:in
test_accept_loop_multi_port'

3) Error:
test_initialize(TestSocket):
Errno::EINVAL: Invalid argument - getsockname(2)
socket/test_socket.rb:39:in getsockname'
socket/test_socket.rb:39:in
block in test_initialize'
socket/test_socket.rb:38:in open'
socket/test_socket.rb:38:in
test_initialize'

4) Error:
test_linger(TestSocket):
Errno::EINVAL: Invalid argument - getsockname(2)
socket/test_socket.rb:304:in `test_linger'

5) Error:
test_tcp(TestSocket):
Errno::EINVAL: Invalid argument - getsockname(2)
socket/test_socket.rb:79:in block in test_tcp'
socket/test_socket.rb:77:in
open'
socket/test_socket.rb:77:in `test_tcp'

6) Error:
test_tcp_server_sockets(TestSocket):
Errno::EINVAL: Invalid argument - getsockname(2)
socket/test_socket.rb:99:in `test_tcp_server_sockets'

7) Error:
test_tcp_server_sockets_port0(TestSocket):
NoMethodError: undefined method each' for nil:NilClass
socket/test_socket.rb:115:in
test_tcp_server_sockets_port0'

8) Error:
test_udp_server(TestSocket):
Errno::EINVAL: Invalid argument - getsockname(2)
socket/test_socket.rb:260:in `test_udp_server'

16 tests, 23 assertions, 0 failures, 8 errors, 0 skips
=end

Actions #1

Updated by yugui (Yuki Sonoda) almost 12 years ago

  • Status changed from Open to Assigned
  • Assignee set to usa (Usaku NAKAMURA)
  • Priority changed from 5 to Normal

=begin
Is this still reproducible? < unak
=end

Actions #2

Updated by usa (Usaku NAKAMURA) almost 12 years ago

=begin
Hello,

In message "[ruby-core:24380] Bug #1323 Sockets broken on windows"
on Jul.16,2009 18:14:53, redmine@ruby-lang.org wrote:

Is this still reproducible? < unak

Yes.

Ruby's socket library expects that getsockname(2) always
returns local address information, but WinSock cannot return
any information from non-connected and non-binded sockets.

akr, any suggestion?

Regards,
--
U.Nakamura usa@garbagecollect.jp

=end

Actions #3

Updated by phasis68 (Heesob Park) almost 12 years ago

=begin
2009/7/16 Tanaka Akira akr@fsij.org:

In article 20090716185929.6EC1.C613B076@garbagecollect.jp,
 "U.Nakamura" usa@garbagecollect.jp writes:

Ruby's socket library expects that getsockname(2) always
returns local address information, but WinSock cannot return
any information from non-connected and non-binded sockets.

akr, any suggestion?

I'd like to investigate the socket family (address family)
of a fd to create addrinfo object.

Is there a way for that on WinSock?

You can use WSADuplicateSocket function to get WSAPROTOCOL_INFO structure.

Regards,

Park Heesob

=end

Actions #4

Updated by usa (Usaku NAKAMURA) almost 12 years ago

  • Status changed from Assigned to Closed

=begin
fixed at revision 24173
=end

Actions

Also available in: Atom PDF