facebookarchive / RakNet

RakNet is a cross platform, open source, C++ networking engine for game programmers.
Other
3.3k stars 1.02k forks source link

WinRT. Correct and easy convert utf-8 string to Platform::String #96

Open perminovVS opened 8 years ago

perminovVS commented 8 years ago

Remove from RakString WinRT convert string code. s_addr variable rename to s_addrVar, for fix compile error

It code already used in cocos2d-x engine - https://github.com/cocos2d/cocos2d-x/pull/13397/commits/d70a21aa25128884d6c1c9cb828e570d04bf58dc

Luke1410 commented 6 years ago

I reviewed your PR to consider it for integration into our fork of RakNet (https://github.com/SLikeSoft/SLikeNet). I agree that the current integration of wide char support in RakString should be revised/improved (internal case number: SLNET-191). However, we'll likely not simply remove the implementation as per your pull request since this would remove a feature/functionality which apps integrating RakNet/SLikeNet might rely on. Your alternative integration of the widechar support seems to be a good basis, though it for sure should go into the RakString class and not into RakNetSocket2_WindowsStore8.cpp. Also note that we already fixed the related issue/crash in RakString::ToWideChar() in our fork (was internal case number: SLNET-190) which is expected to get shipped in SLikeNet 0.2.0.

On the point of the compile errors you got and resolved by renaming s_addr to s_addrVar and the other small changes (namespace corrections rns2List initialization and buf-variable rename): assigned SLNET-195.

Note that the WinRT review is currently scheduled for a later time (of which we'd then consider integrating SLNET-195). If you'd like to have the changes integrated earlier, pls let me know and I'll see to get them prioritized.

Luke1410 commented 6 years ago

The correction for the list initialization was just committed to the SLikeNet SVN repository and master Git repository and is expected to be shipped with SLikeNet 0.2.0 (part of SLNET-195).

Since we are incorporating your changes into SLikeNet (I understand you are making them aware under the original Oculus/RakNet license --- pls let me know if this is wrong), we'd like to offer you adding you to the acknowledgment section of our readme file (due to lack of other means to contact you, posting this in this comment here). The entry would look like this:

Vladimir Perminov: https://github.com/perminovVS (pull request: RAKNET_96)

Please let me know if that's fine with you (preferably by mail to info [at] slikesoft [dot] com - or alternatively leave a comment here). Unless you explicitly say so, we won't put that entry in the readme file (to respect your privacy).