Class: HTTPX::ProxyChannel
- Defined in:
- lib/httpx/plugins/proxy.rb
Direct Known Subclasses
HTTPX::Plugins::Proxy::HTTP::HTTPProxyChannel, HTTPX::Plugins::Proxy::Socks4::Socks4ProxyChannel, HTTPX::Plugins::Proxy::Socks5::Socks5ProxyChannel
Constant Summary
Constants inherited from Channel
Constants included from Loggable
Constants included from Registry
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(io, parameters, options, &blk) ⇒ ProxyChannel
constructor
A new instance of ProxyChannel.
- #match? ⇒ Boolean
- #to_io ⇒ Object
Methods inherited from Channel
by, #close, #interests, #reset, #send, #upgrade_parser
Methods included from Callbacks
Methods included from Loggable
Methods included from Registry
Constructor Details
#initialize(io, parameters, options, &blk) ⇒ ProxyChannel
Returns a new instance of ProxyChannel.
85 86 87 88 |
# File 'lib/httpx/plugins/proxy.rb', line 85 def initialize(io, parameters, , &blk) super(io, , &blk) @parameters = parameters end |
Instance Method Details
#call ⇒ Object
104 105 106 107 108 109 110 |
# File 'lib/httpx/plugins/proxy.rb', line 104 def call super case @state when :connecting consume end end |
#match? ⇒ Boolean
90 91 92 |
# File 'lib/httpx/plugins/proxy.rb', line 90 def match?(*) true end |
#to_io ⇒ Object
94 95 96 97 98 99 100 101 102 |
# File 'lib/httpx/plugins/proxy.rb', line 94 def to_io case @state when :idle transition(:connecting) when :connected transition(:open) end @io.to_io end |