Difference between revisions of "Core Protocol"

From ASSS Wiki
Jump to: navigation, search
m (fixed wrapping line, he won't be coming back to my turf (that's so lame, lol))
m (minor edits)
Line 3: Line 3:
 
There is support for reliable ordered packets, large packets and cluster packets.
 
There is support for reliable ordered packets, large packets and cluster packets.
  
*The maximum packet size is 520 bytes.
+
*The maximum packet size is 520 bytes
*All integers are little endian.
+
*All integers are little endian
 
*All core packets begin with the type byte 0x00
 
*All core packets begin with the type byte 0x00
  
Line 60: Line 60:
 
0      1    type 0x00
 
0      1    type 0x00
 
1      1    type 0x08
 
1      1    type 0x08
2      ?    payload (expect 480)
+
2      ?    payload (expect 472 max)
 
keep appending payloads until 0x09 chunk tail is received
 
keep appending payloads until 0x09 chunk tail is received
  
Line 67: Line 67:
 
0      1    type 0x00
 
0      1    type 0x00
 
1      1    type 0x09
 
1      1    type 0x09
2      ?    payload (expect <= 480)
+
2      ?    payload (expect 472 or less)
 
append this payload then process contents as a non-core packet
 
append this payload then process contents as a non-core packet
  
Line 75: Line 75:
 
1      1    type 0x0A
 
1      1    type 0x0A
 
2      4    total length of all segments
 
2      4    total length of all segments
6      ?    payload (expect 480)
+
6      ?    payload (expect 468 max)
 
keep appending payloads until total length is reached then process contents as
 
keep appending payloads until total length is reached then process contents as
 
a non-core packet.
 
a non-core packet.
Line 95: Line 95:
 
2      1    length
 
2      1    length
 
3      ?    payload with length as above
 
3      ?    payload with length as above
packet repeats from offset 2 until end
+
packet repeats from offset 2 until end, process contents as arbitrary packet
 
</pre>
 
</pre>
  
 
[[Category: Protocol]]
 
[[Category: Protocol]]

Revision as of 11:39, 16 January 2005

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