A message is always sent as a JSON object. The following keys are allowed and denote different types of messages.
The combination of keys __uuid__, __action__, __data__ specifies a request. A request expects reply with the same __uuid__ value to be returned in a certain time frame.
The combination of keys __uuid__, __return__ specifies a reply to the message with the same __uuid__ value. There may not be more than one reply for a given request.
The combination of key __action__, __data__ specifies a notification. A notification message is therefore identical to a request message but lacks the __uuid__ attribute.
Currently not specified.
-
__uuid__: string, which is supposed to be unique for each request. The current de-facto implementation uses random UUIDs for this purpose; advanced schemes might also include some address specification. -
__action__: string, specifies the action to be taken. -
__data__: object, specifies named arguments for a given__action__. If missing, it is assumed to be{}. -
__return__: unrestricted.
Each request must be replied to in a certain time frame. If no reply is received, the server may raise an exception and any later replies with the specified __uuid__ will be ignored.
Currently not specified.
__data__:{}__reply__: string, the name of the team.
__data__:{team_id: , universe:}__reply__: null, reply needed for synchronisation.
__data__:{bot_id:, universe:}__reply__: array, specifying the movement vector[dx, dy].
__data__:{}
__data__: TODO
- TODO
- integer
strings should be unicode