Notes |
|
|
From previous meetings, was there any discussion on the general protocol/idea behind how this would be done? |
|
|
(0012590)
|
Dusk
|
2015-06-08 05:57
|
|
The point of the packet header was so that it would be protocol-agnostic. Every packet Zandronum would ever use would contain this header, which would detail which protocol it is for and how it is compressed. |
|
|
(0012593)
|
Watermelon
|
2015-06-08 14:45
(edited on: 2015-06-08 14:50) |
|
Throwing out some stuff:
Header:
[0x01] Type:
- (0) Reliable
- (1) Unreliable
[0x02] Compression:
- (0) LZ4
- (1) Huffman
* May not actually be needed right now
[remaining 6 bits unused (for now)]
I figure we need Huffman coding since the unreliable stream would mess up LZ4, therefore meaning all unreliable code from server <-> client needs it.
* The reason I said this may not be needed now is that if LZ4 works, then the reliable channel should always be LZ4, and the unreliable channel will always have to be Huffman.
Body:
Reliable:
- Sequence number
- Payload of headers + data
Unreliable:
- Payload of headers + data
|
|
|
|
Here is what I said earlier regarding the header in 0001268:0012193, i.e.
Quote from Torr Samaho
Mandatory contents of the header are the compression type and the packet number (to keep track of lost packets). How exactly they are encoded and if additional things are needed is up for discussion. |
|
|
(0012601)
|
Watermelon
|
2015-06-08 18:18
(edited on: 2015-06-08 18:53) |
|
I'm assuming then this is only for the reliable stream, and the unreliable stream will be handled as it currently is?
If that's the case, the first 2-3 bits of the first byte could be different kind of compression (in case we find any new ones in the future, but I'm guessing we won't keep finding new ones every year), then the sequence number comes after that.
I currently can't think of anything else that would be needed in the header.
I figure if we ever decide in the future for something we need to add, the residual bits in the first byte can be used at a later date. Therefore if nothing is to be added, the unused bits should be set to 0 always for now.
|
|