Actions
Bug #1177
closedeof for socket block script
Description
=begin
eof and eof? run awhile
Is it OK ?
How to check socket EOF without blocking ?
=end
Files
Actions
Like0
Like0Like0Like0
Added by OlegPuchinin (Oleg Puchinin) about 16 years ago. Updated almost 14 years ago.
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 |
=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
=begin
=end
=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