From f5ba5e64d5584e2ceb68ce64b95345bc230ed090 Mon Sep 17 00:00:00 2001 From: aamine Date: Fri, 10 Nov 2000 23:31:32 +0000 Subject: 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 --- lib/net/protocol.rb | 41 ++--------------------------------------- 1 file changed, 2 insertions(+), 39 deletions(-) (limited to 'lib/net/protocol.rb') 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 @@ -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 ) -- cgit v1.2.3