Class: LIFX::Transport Private
- Inherits:
-
Object
- Object
- LIFX::Transport
- Defined in:
- lib/lifx/transport.rb,
lib/lifx/transport/tcp.rb,
lib/lifx/transport/udp.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Attribute Summary collapse
- #host ⇒ Object readonly private
- #port ⇒ Object readonly private
Instance Method Summary collapse
- #close ⇒ Object private
-
#initialize(host, port, ignore_unpackable_messages: true) ⇒ Transport
constructor
private
A new instance of Transport.
- #listen ⇒ Object private
- #observer_callback_definition ⇒ Object private
- #to_s ⇒ Object (also: #inspect) private
- #write(message) ⇒ Object private
Constructor Details
#initialize(host, port, ignore_unpackable_messages: true) ⇒ Transport
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Transport.
11 12 13 14 15 |
# File 'lib/lifx/transport.rb', line 11 def initialize(host, port, ignore_unpackable_messages: true) @host = host @port = port @ignore_unpackable_messages = end |
Instance Attribute Details
#host ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
9 10 11 |
# File 'lib/lifx/transport.rb', line 9 def host @host end |
#port ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
9 10 11 |
# File 'lib/lifx/transport.rb', line 9 def port @port end |
Instance Method Details
#close ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
25 26 27 |
# File 'lib/lifx/transport.rb', line 25 def close raise NotImplementedError end |
#listen ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
17 18 19 |
# File 'lib/lifx/transport.rb', line 17 def listen raise NotImplementedError end |
#observer_callback_definition ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
34 35 36 |
# File 'lib/lifx/transport.rb', line 34 def observer_callback_definition -> (message:, ip: nil, transport: nil) {} end |
#to_s ⇒ Object Also known as: inspect
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
29 30 31 |
# File 'lib/lifx/transport.rb', line 29 def to_s %Q{#<#{self.class.name} #{host}:#{port}>} end |
#write(message) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
21 22 23 |
# File 'lib/lifx/transport.rb', line 21 def write() raise NotImplementedError end |