Class: EventMachine::Socksify::SOCKSError

### Home Classes Methods

### In Files

- lib/em-socksify/errors.rb

### Parent

Exception

### Methods

- ::define
- ::for_response_code
- ::new

### Class/Module Index

Quicksearch

- EventMachine
- EventMachine::Connectify
- EventMachine::Connectify::CONNECT
- EventMachine::Connectify::CONNECTError
- EventMachine::Socksify
- EventMachine::Socksify::SOCKS5
- EventMachine::Socksify::SOCKSError
- Base64

No matching classes.

# 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

    # File lib/em-socksify/errors.rb, line 7
    def initialize
      super(message)
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.