Exception: SocksHandler::RelayRequestFailure
- Inherits:
-
StandardError
- Object
- StandardError
- SocksHandler::RelayRequestFailure
- Defined in:
- lib/socks_handler/errors.rb
Instance Method Summary collapse
-
#initialize(code) ⇒ RelayRequestFailure
constructor
A new instance of RelayRequestFailure.
Constructor Details
#initialize(code) ⇒ RelayRequestFailure
Returns a new instance of RelayRequestFailure.
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/socks_handler/errors.rb', line 12 def initialize(code) case code when 0x01 super("general SOCKS server failure") when 0x02 super("connection not allowed by ruleset") when 0x03 super("Network unreachable") when 0x04 super("Host unreachable") when 0x05 super("Connection refused") when 0x06 super("TTL expired") when 0x07 super("Command not supported") when 0x08 super("Address type not supported") else super("Unknown error") end end |