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

#emit, #on, #once

Constructor Details

#initialize(buffer, options) ⇒ SocksParser

Returns a new instance of SocksParser.



100
101
102
103
# File 'lib/httpx/plugins/proxy/socks5.rb', line 100

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

Instance Method Details

#<<(packet) ⇒ Object



113
114
115
# File 'lib/httpx/plugins/proxy/socks5.rb', line 113

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

#closeObject



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

def close; end

#consumeObject



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

def consume(*); end

#empty?Boolean

Returns:

  • (Boolean)


109
110
111
# File 'lib/httpx/plugins/proxy/socks5.rb', line 109

def empty?
  true
end