class MechanizeSOCKSSupport::Mechanize::HTTP::Agent

Attributes

http[RW]
socks[RW]

Public Instance Methods

set_socks(addr, port) click to toggle source
# File lib/the_mask/mechanize_socks_support.rb, line 25
def set_socks(addr, port)
  set_http unless @http
  @socks_http = Net::HTTP::SOCKSProxy(addr, port)
  @socks = true
end

Private Instance Methods

set_http() click to toggle source
# File lib/the_mask/mechanize_socks_support.rb, line 32
def set_http
  @http = Net::HTTP::Persistent.new 'mechanize'
  @http.idle_timeout = 5
  @http.keep_alive   = 300
end