I have a project, that takes one games information (telemetry data) that comes trough third party "Telemetry server" program, that opens datastream at localhost:19000. The protocol used is HTTP-GET and the data getting in python my Communications Software does this using this :
telemetry_server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
telemetry_server.connect(('127.0.0.1', 19000)) # Setting TCP/IP connection to telemetry server
except socket.error, v:
print "Connection refused."
print "Please start ETS2 Telemetry server before you launch this app."
<CODE exluded, nothing to do with subject>
frame = telemetry_server.recv(512) # Receiving frame of data
data = frame.split('#')
telemetry = data.split('|')
if len(telemetry) == 16: # To be sure that data is complete ("Index out of range" error may appear sometimes without it, that's the simplest walkaround)
<Serial port communication exluded>
So. The problem is now, i would like to implement the code to browser window at first so user can see data on browser (using the all might Construct 2 graphics!) and afterwards id like to make it ask user for IP where to get data on Local Area Network, so user could use example their mobile device, or tablet to see telemetry data like how their truck is doing (Speed, fuel quantity etc).
Take a look at:
Q: Why not continue using python?
A: The problem is , that i want multiplatform, easy to use app for everyone! Current serial port streamer is easy to use, but need hardware to show data.
Q: What game is this?
A: Its Euro Truck Simulator 2 from SCS-Software.
Q: Where to download these server files?
A: From same page where you can see how the datastream is coming to my Serial streamer.