Class: TCPSocket::SOCKSConnectionPeerAddress

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

Overview

string representation of the peer host address

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.



33
34
35
36
37
38
39
# File 'lib/socksify/tcpsocket.rb', line 33

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

Instance Attribute Details

#socks_passwordObject (readonly)

Returns the value of attribute socks_password.



31
32
33
# File 'lib/socksify/tcpsocket.rb', line 31

def socks_password
  @socks_password
end

#socks_portObject (readonly)

Returns the value of attribute socks_port.



31
32
33
# File 'lib/socksify/tcpsocket.rb', line 31

def socks_port
  @socks_port
end

#socks_serverObject (readonly)

Returns the value of attribute socks_server.



31
32
33
# File 'lib/socksify/tcpsocket.rb', line 31

def socks_server
  @socks_server
end

#socks_usernameObject (readonly)

Returns the value of attribute socks_username.



31
32
33
# File 'lib/socksify/tcpsocket.rb', line 31

def socks_username
  @socks_username
end

Instance Method Details

#inspectObject



41
42
43
# File 'lib/socksify/tcpsocket.rb', line 41

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

#peer_hostObject



45
46
47
# File 'lib/socksify/tcpsocket.rb', line 45

def peer_host
  to_s
end