mirror of
https://github.com/TimeCrafters/timecrafters_configuration_tool_desktop.git
synced 2025-12-15 21:32:35 +00:00
Config is now saved and synced when updated
This commit is contained in:
@@ -2,6 +2,7 @@ module TAC
|
||||
class TACNET
|
||||
class Connection
|
||||
TAG = "TACNET|Connection"
|
||||
attr_reader :client
|
||||
def initialize(hostname = DEFAULT_HOSTNAME, port = DEFAULT_PORT)
|
||||
@hostname = hostname
|
||||
@port = port
|
||||
@@ -16,7 +17,7 @@ module TAC
|
||||
handle_connection
|
||||
end
|
||||
|
||||
@packet_handler = PacketHandler.new
|
||||
@packet_handler = PacketHandler.new(host_is_a_connection: true)
|
||||
end
|
||||
|
||||
def connect(error_callback)
|
||||
@@ -58,6 +59,14 @@ module TAC
|
||||
end
|
||||
end
|
||||
|
||||
def puts(packet)
|
||||
@client.puts(packet)
|
||||
end
|
||||
|
||||
def gets
|
||||
@client.gets
|
||||
end
|
||||
|
||||
def connected?
|
||||
!closed?
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user