Core Protocol

From ASSS Wiki
Revision as of 11:39, 16 January 2005 by Smong (talk | contribs) (minor edits)
Jump to: navigation, search

This protocol is UDP and bi-directional. It can be thought of as another layer within an application's network layer.

There is support for reliable ordered packets, large packets and cluster packets.

  • The maximum packet size is 520 bytes
  • All integers are little endian
  • All core packets begin with the type byte 0x00
core

0x01 login
offset size comment
0      1    type 0x00
1      1    type 0x01
2      4    client key
6      2    protocol version (vie = 0x01, ctm = 0x11)

0x02 login response
offset size comment
0      1    type 0x00
1      1    type 0x02
2      4    ~client key (negative)

0x03 reliable header
offset size comment
0      1    type 0x00
1      1    type 0x03
2      4    packet id
6      ?    payload (514 max)

0x04 reliable acknowledge
offset size comment
0      1    type 0x00
1      1    type 0x04
2      4    packet id

0x05 sync
offset size comment
0      1    type 0x00
1      1    type 0x05
2      4    local time
6      4    packets sent
10     4    packets received

0x06 sync response
offset size comment
0      1    type 0x00
1      1    type 0x06
2      4    time from last received 0x05 packet
6      4    server time

0x07 disconnect
offset size comment
0      1    type 0x00
1      1    type 0x07

0x08 small chunk
offset size comment
0      1    type 0x00
1      1    type 0x08
2      ?    payload (expect 472 max)
keep appending payloads until 0x09 chunk tail is received

0x09 chunk tail
offset size comment
0      1    type 0x00
1      1    type 0x09
2      ?    payload (expect 472 or less)
append this payload then process contents as a non-core packet

0x0A stream
offset size comment
0      1    type 0x00
1      1    type 0x0A
2      4    total length of all segments
6      ?    payload (expect 468 max)
keep appending payloads until total length is reached then process contents as
a non-core packet.

0x0B cancel stream request
offset size comment
0      1    type 0x00
1      1    type 0x0B

0x0C cancel stream acknowledge
offset size comment
0      1    type 0x00
1      1    type 0x0C

0x0E cluster
offset size comment
0      1    type 0x00
1      1    type 0x0E
2      1    length
3      ?    payload with length as above
packet repeats from offset 2 until end, process contents as arbitrary packet