MantisBT - VCMI
View Issue Details
0002688VCMIMultiplayerpublic2017-06-01 02:532017-06-02 22:10
SXX 
 
normalfeatureN/A
newopen 
0.99 
 
0002688: We need some checksums for netpacks code
Currently we have versions for our saves serialization, but it's will be very helpful for multiplayer if every build would have checksum for all netpacks code. So server and client could verify they both have same netpacks format.

Of course we could just add one more magic constant and bump it every time we change netpacks, but I pretty sure some template magic could let us do that. Though it's have to be cross-platform and work with all used compilers and this is probably hard part.
No tags attached.
Issue History
2017-06-01 02:53SXXNew Issue
2017-06-01 10:48AVSNote Added: 0007071
2017-06-02 00:48SXXNote Added: 0007074
2017-06-02 12:09AVSNote Added: 0007075
2017-06-02 13:18SXXNote Added: 0007076
2017-06-02 22:10AVSNote Added: 0007077

Notes
(0007071)
AVS   
2017-06-01 10:48   
We need to start incrementing SERIALIZATION_VERSION on each netpacks change, and allow connection only with same version.
(0007074)
SXX   
2017-06-02 00:48   
I really dislike having to change it manually since there must be way to do that with templates.
(0007075)
AVS   
2017-06-02 12:09   
I think that even if template method exists it would be very difficult to implement.
(0007076)
SXX   
2017-06-02 13:18   
Isn't what we store with CTypeList sufficient to determine that protocol in sync?
(0007077)
AVS   
2017-06-02 22:10   
No it is not sufficient. CTypeList only stores types of packets but not serialization format.