Class: TCPSocket::SOCKSConnectionPeerAddress

Inherits:
String
  • Object
show all
Defined in:
lib/socksify.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(socks_server, socks_port, peer_host, socks_username = nil, socks_password = nil) ⇒ SOCKSConnectionPeerAddress

Returns a new instance of SOCKSConnectionPeerAddress.



137
138
139
140
141
# File 'lib/socksify.rb', line 137

def initialize(socks_server, socks_port, peer_host, socks_username = nil, socks_password = nil)
  @socks_server, @socks_port = socks_server, socks_port
  @socks_username, @socks_password = socks_username, socks_password
  super peer_host
end

Instance Attribute Details

#socks_passwordObject (readonly)

Returns the value of attribute socks_password.



135
136
137
# File 'lib/socksify.rb', line 135

def socks_password
  @socks_password
end

#socks_portObject (readonly)

Returns the value of attribute socks_port.



135
136
137
# File 'lib/socksify.rb', line 135

def socks_port
  @socks_port
end

#socks_serverObject (readonly)

Returns the value of attribute socks_server.



135
136
137
# File 'lib/socksify.rb', line 135

def socks_server
  @socks_server
end

#socks_usernameObject (readonly)

Returns the value of attribute socks_username.



135
136
137
# File 'lib/socksify.rb', line 135

def socks_username
  @socks_username
end

Instance Method Details

#inspectObject



143
144
145
# File 'lib/socksify.rb', line 143

def inspect
  "#{to_s} (via #{@socks_server}:#{@socks_port})"
end

#peer_hostObject



147
148
149
# File 'lib/socksify.rb', line 147

def peer_host
  to_s
end