Project

General

Profile

Bug #1177

eof for socket block script

Added by OlegPuchinin (Oleg Puchinin) almost 11 years ago. Updated over 8 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Target version:
ruby -v:
ruby 1.9.1p0 (2009-01-30 revision 21907) [i686-linux]
Backport:
[ruby-core:22258]

Description

=begin
eof and eof? run awhile
Is it OK ?
How to check socket EOF without blocking ?
=end


Files

test_tcp_client.rb (138 Bytes) test_tcp_client.rb OlegPuchinin (Oleg Puchinin), 02/19/2009 11:23 PM
test_tcp_server.rb (212 Bytes) test_tcp_server.rb OlegPuchinin (Oleg Puchinin), 02/19/2009 11:23 PM

History

#1

Updated by nobu (Nobuyoshi Nakada) almost 11 years ago

=begin
Hi,

At Thu, 19 Feb 2009 23:23:23 +0900,
Oleg Puchinin wrote in [ruby-core:22258]:

eof and eof? run awhile
Is it OK ?
How to check socket EOF without blocking ?

Could you show the reproduceable code?

--
Nobu Nakada

=end

#2

Updated by nobu (Nobuyoshi Nakada) almost 11 years ago

  • Status changed from Open to Feedback

=begin

=end

#3

Updated by akr (Akira Tanaka) over 10 years ago

  • Status changed from Feedback to Rejected

=begin
I found server and client code in redmine.

You cannot check EOF until server close the socket or send some data.

Your server, test_tcp_server.rb, doesn't close the socket until the client closes the socket.
The server never send data.

So eof? need to block because the server may close the socket in future.
It is not a bug.
=end

Also available in: Atom PDF