class EventMachine::Socksify::SOCKSError

Constants

AddressTypeNotSupported
CommandNotSupported
ConnectionRefused
HostUnreachable
NetworkUnreachable
NotAllowed
ServerFailure
TTLExpired

Public Class Methods

define(message) click to toggle source
# File lib/em-socksify/errors.rb, line 5
def self.define (message)
  Class.new(self) do
    def initialize
      super(message)
    end
  end
end
for_response_code(code) click to toggle source
# File lib/em-socksify/errors.rb, line 22
def self.for_response_code(code)
  case code.is_a?(String) ? code.ord : code
  when 1 then ServerFailure
  when 2 then NotAllowed
  when 3 then NetworkUnreachable
  when 4 then HostUnreachable
  when 5 then ConnectionRefused
  when 6 then TTLExpired
  when 7 then CommandNotSupported
  when 8 then AddressTypeNotSupported
  else self
  end
end
new() click to toggle source
Calls superclass method
# File lib/em-socksify/errors.rb, line 7
def initialize
  super(message)
end