diff options
author | aamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-02-22 12:10:58 +0000 |
---|---|---|
committer | aamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-02-22 12:10:58 +0000 |
commit | d3b66ccf45b30ad1d7210a30fd05e6aa5f12f216 (patch) | |
tree | dd23edc671484d3da8b20e98bee1bad4c4b6e7a8 /lib/net/protocol.rb | |
parent | 9093e4a4a52c5a0827b1263added83f1116d8810 (diff) | |
download | ruby-d3b66ccf45b30ad1d7210a30fd05e6aa5f12f216.tar.gz |
* lib/net/protocol.rb: set read_timeout dynamically.
* lib/net/http.rb: @@newimpl is always true in the main trunk.
* lib/net/http.rb: HTTP.port -> default_port
* lib/net/http.rb: HTTPResponse.read_response_status -> read_status_line
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2117 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/net/protocol.rb')
-rw-r--r-- | lib/net/protocol.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/net/protocol.rb b/lib/net/protocol.rb index e0ad521f88..b95df2d2d8 100644 --- a/lib/net/protocol.rb +++ b/lib/net/protocol.rb @@ -96,7 +96,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 @@ -378,6 +383,8 @@ module Net @socket.addr[3] end + attr_accessor :read_timeout + attr_reader :socket def connect( otime ) |