Methods

Class/Module Index [+]

Quicksearch

Rex::HostCommunicationError

This exception is raised when there is some kind of error related to communication with a host.

Attributes

host[RW]
port[RW]

Public Class Methods

new(addr = nil, port = nil) click to toggle source
# File lib/rex/exceptions.rb, line 147
def initialize(addr = nil, port = nil)
        self.host = addr
        self.port = port
end

Public Instance Methods

addr_to_s() click to toggle source

This method returns a printable address and optional port associated with the host that triggered the exception.

# File lib/rex/exceptions.rb, line 156
def addr_to_s
        if host and port
                "(#{host}:#{port})"
        elsif host
                "(#{host})"
        else
                ""
        end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.