2

This Question is being Asked Many times on StackOverFlow but in hope of Getting Some Updated answer and Good News Here it Comes again...
I have Created an application GUI in Objective C and now i want to implement my Networking Part in C++ so that i can Use it for Android too.

So is there any C++ Networking Library out there which i can Use for My Purpose or i have to do this in objective C for ios and in java for Android....

bhawesh
  • 1,310
  • 2
  • 19
  • 57
  • @ancode.. when you say network programming, do you mean specific socket programming or a stack for `RTSP`, `RTP` transmission? – Ganesh Apr 05 '13 at 10:31
  • What kind of "networking" do you want to do? General communication? Connect to web-servers? Streaming multimedia? Something else? High level? Low level? – Some programmer dude Apr 05 '13 at 10:31
  • its Socket programming only required. – bhawesh Apr 05 '13 at 10:32
  • 1
    If higher level, look up [cpp-netlib](http://cpp-netlib.org/). for more generic check [Boost ASIO](http://www.boost.org/doc/libs/1_53_0/doc/html/boost_asio.html). – Some programmer dude Apr 05 '13 at 10:33
  • In `C++`, can't we use `std::stream` which I think encapsulates a `socket` interface? – Ganesh Apr 05 '13 at 10:35
  • is Boost ASIO supported on ios? – bhawesh Apr 05 '13 at 10:35
  • 1
    @ancode - http://stackoverflow.com/questions/14036311/official-boost-library-support-for-android-and-ios/14089965#comment19511559_14089965 – dtech Apr 05 '13 at 12:27
  • Even if you use C++ for socket connections, you will still need to consider reachability which requires dealing with Objective-C. Mobile devices are not the same as desktop devices. – ahwulf Apr 05 '13 at 13:09

2 Answers2

2

Poco maybe a choice.

Its networking module have TCP, UDP, HTTP and HTTPS support, both in Android and iOS.

Simon Chen
  • 103
  • 1
  • 8
0

I'd recommend Qt, although it is a little big to use only for its network module. But still, you could move your UI and other code to Qt as well, and get a fully portable application. iOS is currently not officially supported, but official support preview is scheduled for version 5.1 which is due for release at the end of this month. The same goes for Android support as well.

dtech
  • 47,916
  • 17
  • 112
  • 190
  • 2
    well thanks for the information! i have used QT for windows and Linux version of my application. and it is best among all other. but when it comes to tablet devices qt is far away. but its sound good that they are going to give support for ios and android.... :) – bhawesh Apr 05 '13 at 10:47
  • @ancode - yes, QWidgets are awkward on mobile devices, but you can also use QML, which is a much faster way to develop, and not just UI. Currently, QtQuick2 is a no-go on iOS because of the v8 JIT compiling, but you can use QtQuick1 for the time being and move to QtQuick2 when Digia replace the v8 with "v4". At any rate, sockets should work just ok on iOS. – dtech Apr 05 '13 at 10:49