Real time communication for native

Hi,
I am using cocos creator 2.4.6 for creating a multiplayer game, Websockets works fine when built for web platform.
whereas, when it’s built for native it doesn’t work.

can someone suggest how can I establish a RTC between the users.
thank you.

when it’s built for native it doesn’t work.

  • Is there any incorrect information that can be provided?

I dont know the tek for studio dose it comple on cocos2dx out for the apk if so with cocos2dx we have to add to AndroidManifest.xml for pomissions

< uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
< uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
< uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
< uses-permission android:name="android.permission.INTERNET"/>

When on Deug windows or mac fine but for the system to need to ask android pomissions ?.
it may be unrelated but im shore its somewhere along them lines.

WebSocket works fine for Native.

If you need to use WebSocket on the native platform, make sure that the Native Socket module is checked in the Project → Project Settings → Module Config.

Ref: Networking · Cocos Creator