SLikeSoft / SLikeNet

SLikeNet™ is an Open Source/Free Software cross-platform network engine written in C++ and specifially designed for games (and applications which have comparable requirements on a network engine like games) building upon the discontinued RakNet network engine which had more than 13 years of active development.
https://www.slikenet.com/
Other
395 stars 62 forks source link

Add planned ID_SELF_DISCONNECTION to differentiate between connection… #20

Closed rhard closed 6 years ago

rhard commented 6 years ago

There was an old TODO record in RakPeer.c on 5865:

// TODO - RakNet 4.0 - Return a different message identifier for DISCONNECT_ASAP_SILENTLY and DISCONNECT_ASAP than for DISCONNECT_ON_NO_ACK // The first two mean we called CloseConnection(), the last means the other system sent us ID_DISCONNECTION_NOTIFICATION

With this modification the library can differentiate between connection lost and self initiated disconnection (when we call CloseConnection()).

Luke1410 commented 6 years ago

Thanks for the pull request. We don't happen to have a CLA for you on our record yet. Please see https://github.com/SLikeSoft/SLikeNet/blob/master/.github/CONTRIBUTING.md . If you are fine with that, just send us a quick mail so we can incorporate your change in SLikeNet.

In principle this looks fine. However, it will be an API breaking change and therefore we'll have to put this into the 2.0 release of SLikeNet (in addition to add a test for this change to our test suite). Given your pull request, I understand that you'd make use of this fix in your own project already? If so, I'll see to make available the 2.0 development branch which contains will then contain this pull request already right now.

rhard commented 6 years ago

Hi, I sent an email with CLA declaration. Yes, I already use this change in my product. It would be nice to have an access to 2.0 branch.

Luke1410 commented 6 years ago

Pull request merged and is expected to be shipped with SLikeNet 2.0.0. If it simplifies things for you, feel free to use the 2.0.x branch already but bare in mind that this will be an ongoing development branch which should be considered unstable (i.e. we are not running regular daily regression tests on this branch).

We'll also make a couple of minor adjustments/tweaks to your initial pull request in following commits.