mirror of
https://github.com/cyberarm/i-mic-rts.git
synced 2025-12-16 08:02:36 +00:00
Basic networking implemented, currently non functional
This commit is contained in:
25
lib/networking/connection.rb
Normal file
25
lib/networking/connection.rb
Normal file
@@ -0,0 +1,25 @@
|
||||
class IMICRTS
|
||||
class Networking
|
||||
class Connection
|
||||
def initialize(director:, hostname:, port:)
|
||||
@director = director
|
||||
@hostname = hostname
|
||||
@port = port
|
||||
|
||||
@client = Networking::Client.new(TCPSocket.new(@hostname, @port))
|
||||
end
|
||||
|
||||
def connected?
|
||||
@client.connected?
|
||||
end
|
||||
|
||||
def update
|
||||
@client.update
|
||||
end
|
||||
|
||||
def close
|
||||
@client.close
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user