UDP question

0 votes
Hello All

I know that to use UDP protocol I should first call initUDP after connected. I tested and no problem sending udp packages. But I want to ask some questions about it.

1-In explanation of initUDP it says "If the user is connected, it sends an associated UDP Port message to the room (or lobby) to which the user is currently joined." But I am not joined to any room or lobby yet after I connected server. So I didnt understood the explanation. What is it?

2-What I am doing right now is: inside onConnectionDone callback if it is success I call initUDP. Then check onInitUDPdone. For now I assume it successfully initialized UDP connection. But what should I do if it returns not success? Should I not use udp? or can I continue sending my packages using UDP?(Maybe apwarp handle this issue at background)

3- If I call initUDP it freezes my unity editor second time I click play button!!! First time I can start game, it shows init UDP done successfully. Then I stop game. When I click play button again, editor freezes. If I comment initUDP no problem, editor does not freezes.

4- What is the difference between AppwapUnity.dll and AppwapUnityMobile.dll? Should I replace the dll file when I build for my phone? And replace again when I test in editor(standalone)? But I build to my phone with AppwarpUnity.dll and no problem! I can successfully connect and send data to another phone! Can you tell me why there are different dll?

That is it for now:) Thanks
asked Jan 10, 2016 in AppWarp by gokhan (20 points)

1 Answer

0 votes

Hello Gokhan,

Please find the answers below:

1. Yes, you are right. It sends an associated UDP Port message over the Connection. We will get the documentation updated.

2. Yes, If InitUDP not succeeded (UDP not supported), AppWarp internally handle it and use TCP Connection for further communication.

3. Could you please share the logs if possible, whenever your application is getting freezes, it will help us to debug the problem.

4. We have provided different AppWarp.dll file for mobile and desktop because in earlier Unity versions, for Mobile Socket was not supported. After launch of Unity 5.X , it works throughout. Now you can use same dll file to build mobile as well as desktop application..

Let me know if more queries are concern.

Thanks & Regards

Vishnu Garg

answered Jan 11, 2016 by Vishnu Garg (674 points)
How to get logs?
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...