Skip to content

Skylive Protocol

nextime edited this page Feb 19, 2013 · 6 revisions

This is the internal communication protocol used by the client to connect to the skylive Servers.


The skylive protocol uses the following formatting for each communication between clients and server :

  • Start string “[“
  • End string “]”
  • Command/parameters separator “>”
  • Parameters separator “|”
  • Parameters/CRC separator “:”

String Example [Command>Par1|Par2|Par3:CRC]

String Example(real) [GOTO>M41|M117:907]

CRC is the arithmetic sum of each equivalent ASCII values of all the chars between “[“ and “:” expressed in numerical value.

For Example : [GOTO>M41|M117:907] -> “GOTO>M41|M117” -> 71+79+84+79+62+77+52+49+124+77+49+49+55 = 907


Login sequence:

The Client open a TCP connection to “www.skylive.name” port “8080”

  1. Server>Client [LOGIN>Timestamp,ProtocolVersion:666]
  2. Client>Server [LOGIN>Username|Password|Ver:CRC]

If the user exist in the skylive server : Server>Client [ENABLE>USERTYPE:CRC]

If the user does not exist in the Skylive server : Server>Client [ENABLE>WRONGUSER:CRC]

Note: "Ver" is the Client version (Es. IP10 for iphone)

USERTYPE:

  • ADMIN (the Client has enable all the Admin features)

  • ENABLED (User enabled to the base commando, like GOTO, photo etc..)

  • GUEST (Guest user, enabled only for chatting, and last photo)

Username and Password must cover the rule “URLENCODE”*


Chat related commands

Pubblic chat

  • Client>Server [CPUBLIC>message:CRC]

  • Server>AllClients [CPUBLIC>User|message:CRC]

User and message must cover the rule “URLENCODE”


Private chat

  • Client>Server [CPRIVAT>SelectedUser|message:CRC]

  • Server>SelectedUser [CPRIVAT>User|message:CRC]

User and message must cover the rule “URLENCODE”


User list command

The client can get the current updated list of connected users using the following link :

URLLive(see Telescope infos section) + userlist.txt?ts=currenttimestamp

For example :

http://live1.skylive.name/tele1/userlist.txt?ts=3640

will get the userlist in ascii text format, with one user for each line, for example :

  • user1
  • user2
  • user3
  • user…

Generic Commands

Telescope status

  • Server>AllClients [STATUS>message:CRC]

Message must cover the rule “URLENCODE”

This is the main telescope status sent by the server to all the telescope’s users connected.


PING/PONG Client

  • Client>Server [PING>TS,ServersList:CRC]

  • Server>Client [PONG>NIL:CRC]

This is the PING/PONG method to determinate if the client is still connected.

After 60 sec , if not PONG is received , the Server will close the Client, and remove it from the user list.

TS is the TimeStamp sent to Clients for syncing the live and photo files to get, it is the total seconds of the day , step by 10.

ServerList is the list index of the servers in number format, for example “1-2-3” means the availability of 3 servers for live and photo indexed as 1, 2 and 3.


Change Telescope

  • Client>Server [CHTELE>NTele:CRC]

This command tell to the server that the client moves from a telescope to another.


Clone this wiki locally