Codec negotiation
All commands are delimited with newline ("\n").
- First both client and server sends arbitary greeting string
starting with "ATLAS" like, "ATLAS server libAtlasPy\n".
- If first 5 letters are not "ATLAS", then reply with
"Huh?\n\n" and close connection
- Then client sends list of codecs it supports prefixed with
"ICAN ", official ones for are:
Unofficial ones should be prefixed with "X-".
After it has sent list, it sends empty line "\n".
- Then server sends codec it will use, example: "IWILL XML\n\n"
Or if none found, then it can optionally send list of codecs
it supports using "ICAN foo\n" format.
- After server has selected codec both can start streaming
actual Atlas operations.
Amount of things sent at one time should not change logic: other
side can send one or many lines in one chunk.
Server might also be non responding variety: Example when you
area reading from local file (file=server, program reading from
file=client). In this case server sends whole negotiation and
following data in arbitrary chunks (including line breaks, etc..)
depending how you read things from file.
All unknown commands should be ignored.
Example:
Server: "ATLAS server libAtlasPy\n"
Client: "ATLAS client UClient\nICAN Packed\nICAN XML\n\n"
Server: "IWILL XML\n\n"
Example when saving to file:
"ATLAS mapeditor foo 0.3.4\nIWILL XML\n\n"
<atlas>
..... here actual objects....
</atlas>
Aloril
Last modified: Mon Jan 15 07:25:33 EET 2001