Config is now saved and synced when updated

This commit is contained in:
2020-06-07 22:47:53 -05:00
parent ab6edb7a58
commit 151df4ca57
14 changed files with 162 additions and 59 deletions

View File

@@ -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