diff options
author | aamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-11-10 23:31:32 +0000 |
---|---|---|
committer | aamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-11-10 23:31:32 +0000 |
commit | f5ba5e64d5584e2ceb68ce64b95345bc230ed090 (patch) | |
tree | df66349e1e6600e186d3615818a5e1f4ba4a2c85 /lib/net/protocol.rb | |
parent | ae5cb89708114b7b71221ddd81d0f423a0a483f4 (diff) | |
download | ruby-f5ba5e64d5584e2ceb68ce64b95345bc230ed090.tar.gz |
aamine
* lib/net/protocol.rb, smtp.rb, pop.rb, http.rb: 1.1.31
* lib/net/http.rb: initializes header in HTTP, not HTTPCommand
* lib/net/protocol.rb, http.rb: rewrites proxy code
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1035 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/net/protocol.rb')
-rw-r--r-- | lib/net/protocol.rb | 41 |
1 files changed, 2 insertions, 39 deletions
diff --git a/lib/net/protocol.rb b/lib/net/protocol.rb index e070d29d99..82cc82fa24 100644 --- a/lib/net/protocol.rb +++ b/lib/net/protocol.rb @@ -1,6 +1,6 @@ =begin -= net/protocol.rb version 1.1.30 += net/protocol.rb version 1.1.31 written by Minero Aoki <aamine@dp.u-netsurf.ne.jp> @@ -31,10 +31,6 @@ Object This method creates a new Protocol object and opens a session. equals to Net::Protocol.new( address, port ).start( *protoargs ) -: Proxy( address, port ) - This method creates a proxy class of its protocol. - Arguments are address/port of proxy host. - === Methods : address @@ -69,7 +65,7 @@ module Net class Protocol - Version = '1.1.30' + Version = '1.1.31' class << self @@ -85,38 +81,6 @@ module Net end end - def Proxy( p_addr, p_port = nil ) - p_port ||= self.port - klass = Class.new( self ) - klass.module_eval %- - - def initialize( addr, port ) - @proxyaddr = '#{p_addr}' - @proxyport = '#{p_port}' - super @proxyaddr, @proxyport - @address = addr - @port = port - end - - def connect( addr = nil, port = nil ) - super @proxyaddr, @proxyport - end - private :connect - - attr_reader :proxyaddr, :proxyport - - - def klass.proxy? - true - end - - klass - end - - def proxy? - false - end - - private def protocol_param( name, val ) @@ -225,7 +189,6 @@ module Net - class Response def initialize( ctype, cno, msg ) |