Bug #1323
closedSockets broken on windows
Description
=begin
Ruby built with VC2008. All the socket tests fail.
ruby socket\test_socket.rb
-
Error:
test_accept_loop(TestSocket):
NoMethodError: undefined methodeach' for nil:NilClass socket/test_socket.rb:202:in
test_accept_loop' -
Error:
test_accept_loop_multi_port(TestSocket):
NoMethodError: undefined methodeach' for nil:NilClass socket/test_socket.rb:222:in
test_accept_loop_multi_port' -
Error:
test_initialize(TestSocket):
Errno::EINVAL: Invalid argument - getsockname(2)
socket/test_socket.rb:39:ingetsockname' socket/test_socket.rb:39:in
block in test_initialize'
socket/test_socket.rb:38:inopen' socket/test_socket.rb:38:in
test_initialize' -
Error:
test_linger(TestSocket):
Errno::EINVAL: Invalid argument - getsockname(2)
socket/test_socket.rb:304:in `test_linger' -
Error:
test_tcp(TestSocket):
Errno::EINVAL: Invalid argument - getsockname(2)
socket/test_socket.rb:79:inblock in test_tcp' socket/test_socket.rb:77:in
open'
socket/test_socket.rb:77:in `test_tcp' -
Error:
test_tcp_server_sockets(TestSocket):
Errno::EINVAL: Invalid argument - getsockname(2)
socket/test_socket.rb:99:in `test_tcp_server_sockets' -
Error:
test_tcp_server_sockets_port0(TestSocket):
NoMethodError: undefined methodeach' for nil:NilClass socket/test_socket.rb:115:in
test_tcp_server_sockets_port0' -
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
Updated by yugui (Yuki Sonoda) over 15 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
Updated by usa (Usaku NAKAMURA) over 15 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
Updated by phasis68 (Heesob Park) over 15 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
Updated by usa (Usaku NAKAMURA) over 15 years ago
- Status changed from Assigned to Closed
=begin
fixed at revision 24173
=end