zpl-c / enet

⚡️ ENet reliable UDP networking library
https://blog.zpl.pw
MIT License
703 stars 60 forks source link

Original Enet protocol compatibility #24

Closed oktonion closed 3 years ago

oktonion commented 3 years ago

While I fully support your idea of moving things forward with fresh codebase my concerns are about compatibility with original Enet protocol.

Few questions:

  1. If I, as end user, switch original Enet library with this port in my application - would it work with older version of my application (built with original Enet) or not?
  2. If №1 answer is "yes" or "yes but..." or "maybe but..." then what kind of issues could pop up (unstable connection, missing packets etc.)?
  3. If №1 answer is "no" then could you consider keeping compatibility with original Enet protocol or is it technically impossible to do so?
inlife commented 3 years ago

Hey @oktonion

Sorry for the long delay. Let me answer those questions one by one:

  1. I would recommend against it. We've merged from 5-10 features from different forks, and some of those if I remember was quite major, in terms of what they did to the protocol. Especially the ipv6 support, iirc. Can't give you 100% answer, however, but I believe that is something that could be tested.
  2. If the protocol size is different most likely the issues would be incorrectly read packets which would lead to incorrect data being passed to the application (invalid sizes, corrupted data sets, etc)
  3. Unfortunately it is not that is possible taking into account the reasons mentioned above, especially the ipv6 (again) :)

Hope that clears the situation a bit!

oktonion commented 3 years ago

@inlife thanks for clear explanation. Hope your implementation will become mainstream and mature enough so I could switch to it and break protocol compatibility 1 time.