Class: Tox::Proxies::Base Abstract
- Inherits:
-
Object
- Object
- Tox::Proxies::Base
- Defined in:
- lib/tox/proxies/base.rb
Overview
This class is abstract.
Base class for proxy used to connect to TCP relays.
Constant Summary collapse
- HOST_MAX_BYTESIZE =
255
- PORT_RANGE =
1..65_535
Instance Attribute Summary collapse
-
#host ⇒ Object
Returns the value of attribute host.
-
#port ⇒ Object
Returns the value of attribute port.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(host, port) ⇒ Base
constructor
A new instance of Base.
- #type ⇒ Object
Constructor Details
#initialize(host, port) ⇒ Base
Returns a new instance of Base.
15 16 17 18 |
# File 'lib/tox/proxies/base.rb', line 15 def initialize(host, port) self.host = host self.port = port end |
Instance Attribute Details
#host ⇒ Object
Returns the value of attribute host.
13 14 15 |
# File 'lib/tox/proxies/base.rb', line 13 def host @host end |
#port ⇒ Object
Returns the value of attribute port.
13 14 15 |
# File 'lib/tox/proxies/base.rb', line 13 def port @port end |
Instance Method Details
#==(other) ⇒ Object
24 25 26 27 28 |
# File 'lib/tox/proxies/base.rb', line 24 def ==(other) self.class == other.class && host == other.host && port == other.port end |
#type ⇒ Object
20 21 22 |
# File 'lib/tox/proxies/base.rb', line 20 def type raise NotImplementedError, "#{self.class}#type" end |