Create UDP server using C++ to embed in cross platform iOS and Android app

Published

I am developing a cross-platform mobile game (iOS and Android) using cocos2d-x.
Most of my code is written in C++, with OS specific code in Objective-C / Java / Swift using a bridge.

I was wondering if anyone has used any C++ library to host a UDP server within their app ?

EDIT: So far I have found many platform specific solutions (using Java for Android, and cocoaasync etc for iOS), but nothing specifically in C++ which has been used for a cross platform app.

Edit: I would prefer a solution without boost. Preferably something simple to include like adding a couple of files to a project.

Source: Ios

Published
Categorised as android, c++, c++11, cocos2d-x, ios

Answers

You can most probably use Valve’s GameNetworkingSockets, https://github.com/ValveSoftware/GameNetworkingSockets

They have very limited external dependencies, so you should be able to compile them for both iOS and Android

You can also take a look at this list: https://github.com/MFatihMAR/Awesome-Game-Networking, where there is a list of libraries that you can alternatively try.


Mrs. Adell Wehner V

Leave a Reply

Your email address will not be published. Required fields are marked *

Still Have Questions?


Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us
faq