PiBoSo Official Forum

World Racing Series => General Discussion => Documentation => Topic started by: PiBoSo on June 06, 2015, 07:03:57 PM

Title: Live Timing
Post by: PiBoSo on June 06, 2015, 07:03:57 PM
It is possible to connect to a dedicated server to receive live race data.
Only 1 client can connect to the server.

Communication is made with UDP sockets and strings terminated with "\n".

Send "CONNECT" followed by the connection password ( empty string if no password ).
Reply:
OK -> connected
FULL -> another client is already connected
WRONGPASSWORD -> wrong password

Send "START" to start receiving data.
Data format is "MSG" followed by the message ID and then a stream of strings.
Send "ACK" followed by the message ID after each MSG.

Send "KEEPALIVE" every 15 seconds to keep the connection active.
The server sends "ALIVE" to report that the connection is active.

Send "DISCONNECT" to correctly close the connection.