[#70843] Re: [ruby-cvs:58952] hsbt:r51801 (trunk): * lib/rubygems: Update to RubyGems HEAD(fe61e4c112). — Eric Wong <normalperson@...>
hsbt@ruby-lang.org wrote:
3 messages
2015/09/17
[ruby-core:70749] [Ruby trunk - Bug #8219] ruby 2.0.0-p0 socket.recv MSG_OOB problem?
From:
zzak@...
Date:
2015-09-13 03:11:59 UTC
List:
ruby-core #70749
Issue #8219 has been updated by Zachary Scott. Assignee changed from Martin Bosslet to openssl ---------------------------------------- Bug #8219: ruby 2.0.0-p0 socket.recv MSG_OOB problem? https://bugs.ruby-lang.org/issues/8219#change-54128 * Author: wind winy * Status: Assigned * Priority: Normal * Assignee: openssl * ruby -v: * Backport: ---------------------------------------- server1.rb ------- require 'socket' ssc = TCPServer.new '', 9989 sc = ssc.accept p sc.recv(1024) p sc.recv(1024) # ruby 2.0.0p0: has OOB data, not return until remote send data again or close p sc.recv(1024, Socket::MSG_OOB) p sc.recv(1024, Socket::MSG_OOB | Socket::MSG_PEEK) p sc.recv(1024, Socket::MSG_OOB) p sc.recv(1024) ------ client1.rb ------------- require 'socket' sc=TCPSocket.new '127.0.0.1', 9989 sc.send '1234', 0 sleep 1.5 sc.send 'abcd', Socket::MSG_OOB sleep 3 sc.send 'EFGH', Socket::MSG_OOB sleep 1.5 ---------------- Use ruby 2.0.0p0 run above server1 code, output is "1234" "abc" "dH" "" "" "EFG" , use ruby 1.9.3p327 or python or c code, output is "1234" "abc" "d" "H" "H" "EFG" Is this has a bug? -- https://bugs.ruby-lang.org/