Class: HTTPX::Plugins::Proxy::Socks5::SocksParser

Inherits:
Object
  • Object
show all
Includes:
Callbacks
Defined in:
lib/httpx/plugins/proxy/socks5.rb

Instance Method Summary collapse

Methods included from Callbacks

#callbacks_for?, #emit, #on, #once, #only

Constructor Details

#initialize(buffer, options) ⇒ SocksParser

Returns a new instance of SocksParser.



136
137
138
139
# File 'lib/httpx/plugins/proxy/socks5.rb', line 136

def initialize(buffer, options)
  @buffer = buffer
  @options = Options.new(options)
end

Instance Method Details

#<<(packet) ⇒ Object



153
154
155
# File 'lib/httpx/plugins/proxy/socks5.rb', line 153

def <<(packet)
  emit(:packet, packet)
end

#closeObject



145
# File 'lib/httpx/plugins/proxy/socks5.rb', line 145

def close; end

#consumeObject



147
# File 'lib/httpx/plugins/proxy/socks5.rb', line 147

def consume(*); end

#empty?Boolean

Returns:

  • (Boolean)


149
150
151
# File 'lib/httpx/plugins/proxy/socks5.rb', line 149

def empty?
  true
end

#timeoutObject



141
142
143
# File 'lib/httpx/plugins/proxy/socks5.rb', line 141

def timeout
  @options.timeout[:operation_timeout]
end