The purpose of Atlas handshake is to announce the peer type in compact, human readable manner and negotiate the applied Atlas codec.
All commands are delimited with newline ("\n"). First both client and server send arbitary greetings starting with "ATLAS". For example: "ATLAS server libAtlasPy\n". If first five letters are not "ATLAS" then the peer should reply "Huh?\n\n" and then close the connection. Next the client sends a list of codecs it supports with each codec prefixed with "ICAN " and delimited with "\n". Codec names are case sensitive. Official codecs are:
Unofficial codecs should be prefixed with "X-". After the client has sent the list, it sends an empty line: "\n". The server responds with codec it will use. For example: "IWILL XML\n\n" or if no shared codec is found then the server can optionally send a list of codecs it supports using "ICAN foo\n" format. After the server has selected codec both parties can start streaming atlas objects. Number of lines sent at one time should not change the behaviour of the receiver. The sender can send one or many lines in one chunk. All unknown commands should be ignored. All responses should happen in 10 seconds from the trigger event (connection or message). If timeout occurs the peer should close the connection and throw timeout exception.
Server: "ATLAS server libAtlasPy\n"
Client: "ATLAS client UClient\nICAN Packed\nICAN XML\n\n"
Server: "IWILL XML\n\n"