diff --git a/ChangeLog b/ChangeLog index c96c968864..95b6bfb3b5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Fri Feb 22 22:00:08 2002 Minero Aoki + + * lib/net/protocol.rb: set read_timeout dynamically. + Fri Feb 22 19:59:33 2002 Usaku Nakamura * win32/config.status.in: set LIBRUBY_SO. diff --git a/lib/net/protocol.rb b/lib/net/protocol.rb index 3b36375614..6a3441da66 100644 --- a/lib/net/protocol.rb +++ b/lib/net/protocol.rb @@ -98,7 +98,12 @@ module Net attr_reader :socket attr_accessor :open_timeout - attr_accessor :read_timeout + attr_reader :read_timeout + + def read_timeout=( sec ) + @socket.read_timeout = sec if @socket + @read_timeout = sec + end def active? @active @@ -453,6 +458,8 @@ module Net @socket.addr[3] end + attr_accessor :read_timeout + attr_reader :socket def connect( otime )