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:
@@ -8,7 +8,6 @@ module TAC
|
||||
|
||||
def initialize
|
||||
@connection = nil
|
||||
@server = nil
|
||||
end
|
||||
|
||||
def connect(hostname = DEFAULT_HOSTNAME, port = DEFAULT_PORT, error_callback = proc {})
|
||||
@@ -17,5 +16,27 @@ module TAC
|
||||
@connection = Connection.new(hostname, port)
|
||||
@connection.connect(error_callback)
|
||||
end
|
||||
|
||||
def connected?
|
||||
@connection && @connection.connected?
|
||||
end
|
||||
|
||||
def client
|
||||
if connected?
|
||||
@connection.client
|
||||
end
|
||||
end
|
||||
|
||||
def puts(packet)
|
||||
if connected?
|
||||
@connection.puts(packet)
|
||||
end
|
||||
end
|
||||
|
||||
def gets
|
||||
if connected?
|
||||
@connection.gets
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user