2013-07-18 23:47:27 +08:00
|
|
|
Protocol for messages, data, etc..
|
|
|
|
|
|
|
|
Streaming audio/video will not use this protocol as they can absorb some data loss.
|
2013-07-02 03:17:09 +08:00
|
|
|
|
2013-07-19 01:56:50 +08:00
|
|
|
The protocol itself will run on top of the encryption which means it should be
|
|
|
|
impossible for someone to know what type of data is being transmitted.(Well they
|
2013-07-02 03:17:09 +08:00
|
|
|
could just analyze how much data is being transmitted for a pretty good guess)
|
|
|
|
|
|
|
|
Because it runs on the encryption which itself runs on our Lossless UDP protocol
|
|
|
|
it can be guaranteed that no data will be lost.
|
|
|
|
|
|
|
|
Basic packet format:
|
|
|
|
[char data_id][data]
|
|
|
|
|
|
|
|
data_id represents the type of data.
|
|
|
|
|
2013-07-18 23:47:27 +08:00
|
|
|
All strings must be UTF-8.
|
|
|
|
|
2013-07-02 03:17:09 +08:00
|
|
|
EX: data_id 64 designates a chat message. so the packet would look like: @Hello WorldNULL
|
|
|
|
Where @ is the ASCII character for 64, "Hello World" is the message and NULL is the null string terminator.
|
|
|
|
|
|
|
|
Proposed data_ids and what they mean (in decimal)
|
|
|
|
|
|
|
|
ids 0 to 16 are reserved.
|
|
|
|
|
2013-07-18 23:47:27 +08:00
|
|
|
48 Username (Send this packet as soon as you connect to a friend or to each friend everytime you change names.
|
|
|
|
Username is maximum 128 bytes long with the null terminator included)
|
|
|
|
|
2013-07-02 03:17:09 +08:00
|
|
|
|
|
|
|
64 Chat message
|
2013-07-18 23:47:27 +08:00
|
|
|
6? File transmission.
|
2013-07-19 01:56:50 +08:00
|
|
|
70 Status change
|