Class: Lorraine::NetworkConnection
Instance Attribute Summary collapse
Instance Method Summary
collapse
Methods inherited from Connection
#animate_to_image, #display_image, #display_pixels, #initialize, #sever!
Instance Attribute Details
#hostname ⇒ Object
6
7
8
|
# File 'lib/lorraine/network_connection.rb', line 6
def hostname
@hostname || "localhost"
end
|
#port ⇒ Object
11
12
13
|
# File 'lib/lorraine/network_connection.rb', line 11
def port
@port || "3010"
end
|
Instance Method Details
#write_message(msg) ⇒ Object
15
16
17
18
|
# File 'lib/lorraine/network_connection.rb', line 15
def write_message(msg)
Lorraine::Client.send_message(msg, self.hostname, self.port)
puts "Writing network message: #{msg}"
end
|