Libuv with cocos2d-x WP8

Libuv with cocos2d-x WP8

Have any one succeeded using libuv with windows phone shared project ?
Because when I use it in windows it works fine, but when I include it in the shared project it throws exceptions in the windows phone part.

Why you need libuv in the client ?
Its server lib

Hi Meir,
Thanks for the reply,
I want to create P2P game and one of the mobile phones needs to host the game.?
Do you have some suggestions ?
I really like libuv library so I think that I will stick to it for now.

Yeah libuv is great i love it to see my tutorial about it

Any way my suggestion is not reinvent the wheel try to check on the web how others did it , it doesn’t need to be cocos2d-x

i guess if you really want to compile libuv you could as it is very cross platform C .

Thanks Meir,
I saw your tutorial couple of weeks ago, and I really loved it (thanks for sharing), but it doesn’t suits me.
I wrote a thread in the libuv group and they told me that that they do not support WP8 for now but I wanted to see if there is someone here that found some workaround.

Have you done some P2P using cocos2d ?

no i have not done any p2p
i did test ENet and its client side component copiles fine on iOS
this is UDP networking lib , very minimal and simple you can try it .

You have also RakNet
But it haven’t been updated since Oculus bought but you can try it , it very gaming oriented lib

Thanks, I will take a look :slight_smile:

Sure you are welcome , i think i will work on my next tutorial which will be p2p or general TCP client server
register my tutorial site or watch this forum when i update with the tutorial .

check this :


Hi Meir,
I am more or less familiar with the P2P part, this is not the issue here.
I am trying to compile the libuv library for windows phone (for IOS and Android, I believe it works, at least they claim to support it).
Also I wont to use c/c++ for speed and as much I can see Thali is written in JS (I think because of the cordova part).
I think to try ENet for now, I thought to use UDP so it will fit really well (because of firewell issues with TCP).

I see great so update me if its works , do you going to test iOS also ?

When the time comes YES :slight_smile:
I will, like always the most tricky part is WP8.
If it works I believe that it will work everywhere!
I really don’t understand the people from Microsoft! They encourage developers to create apps for WP8, but its the most tricky platform!

is it even worth to build app for wp8?

The first and the most important thing is that I have WP8 and I dont have in what to play with :smiley:
The other thing is, like I mentioned there are no apps so every new app van be directly shown in the store without the need to wait like you wait in google store.

Hi Meir,
I tried the ENET library and its looks to work pretty well , but again not for windows phone.
It depends on WINMM.Lib which is not supported in WP8. :frowning:

Well im not familiar with WP8 .
mybe you can do some porting work on the ENET lib

Hi Meir,
I used enet, and it seems to work perfectly!
The problem is that both for libuv and enet the server part does not want to receive anything.
The client part works perfectly!
The firewall also isn’t the issue because I turned it off for checking it and the problem is still there.
Do you have some ideas ?

first make simple client server application on your local pc , see if its working ( before creating APK)
then upload the server to real simple VPS .
and use the simple client to check if it is working .
can be many things … you can use TCPDUMP in your server to check if there is some kind of connection that is made .