Project

General

Profile

Actions

Bug #1177

closed

eof for socket block script

Added by OlegPuchinin (Oleg Puchinin) about 12 years ago. Updated almost 10 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
Actions #1

Updated by nobu (Nobuyoshi Nakada) about 12 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

Actions #2

Updated by nobu (Nobuyoshi Nakada) about 12 years ago

  • Status changed from Open to Feedback

=begin

=end

Actions #3

Updated by akr (Akira Tanaka) about 12 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

Actions

Also available in: Atom PDF