UDPEcho or C Code? - iphone

Im making an iPhone application that sends commands and retrieves data through an UDP connection.
I have a question, since my previous question did not get answered and I was not able to fix it by now I am looking for two other ways to implement an UDP connection.
UDPEcho
C code
Which one is better [advantages/disadvantages] and which one is easier or recommended to implement it into an iphone application?

UDPEcho already set up the iOS project for you, so unless you need to port your app to other platforms afterwards, that would give you a headstart compared to C code.

Related

How to get list of devices thst are connected to router using program

Using c programing i need to display mac address of the devices which are connected to router on terminal.I tried with so many things bt still i am not getting the exact output.Else any command is there to get that details please share.i am doing project based on this so please if anyone know means share the answers.
Not sure about doing it with C, but I have a look at ettercap you could use some command line script to to easily get info about all connected devices a local network.
What you are looking for is to write your your arp-scan.
To do this basically you'll need to write or use existing C based ping code. Apple has a nice simple ping.
Here is the link to apple's simple ping -
simplePing
Then you will want to open your devices arp-table. This will vary based on device but there should be some way to make C code compatible across a narrow range of devices.
Here is an interesting code review involving what you are looking for.
Post is here

Direct VoIP call from one iOS device to another

I'am going to develop peer-to-peer VoIP iOS application. And want do it without any SIP proxy, SIP providers and other servers. Just VoIP calls frpm iOSdevice-to-iOSdevice. Both iOS device could be somewhere in Internet. Is it real in VoIP (with PJSIP for example and general with SIP)?
Could you please point me to main keys that I need for development.
I have already read these topics. Is it real solve problems with addressing in my configuration. PJSIP could help with correcting addressing?
Look at Apples Multipeer Connectivity framework. I have built an app that does exactly what you want. If you look to my profile and the questions I have asked you will get some good guidance. Though I recommend you do it with a backend since MultiPeer wasn't the best solution, atleast when it comes to supporting multiple peers and to be able to call another device that has the app in the background.
See Frank Shearar's Answer Here
In short, it looks like this would be a very difficult task.
Another option would be to use the Twilio SDK for iPhone (Obj-C). This would work well for what you're trying to do and would be a whole lot easier. Link

How can I build/install/run a server program to communicate with the iPhone?

I'd like to play with the idea of creating a server program that communicates with an iPhone app over socket connections. I've found several guides within Apple's documentation for client side programming (with CFNetwork, NSStream, etc) but I don't know where to begin on programming the server application, or even what language to use, or for that matter, how to deploy and run a server application on my current web hosting package through Go Daddy. A simple instant messenger style application example should get me started, but any advice is appreciated.
if you want to create socket connection is better to use CFNetwork , it has more flexibility for you I already used NSURLConnection but CFNetwork has better performance. this is my steps and how I developed my app :
configuration of server
selection C++ for my server side (service)
start to develop a client-side app for iphone to connect to server using NS classes
but I had some problems in sending and receiving message to and form server . so I changed it to CF classes it works better and faster now.
The easiest way to handle server-to-device communications is to use APNS (Apple Push Notification Services).
Communication in the other direction (device-to-server) can be handled simply with NSUrlConnection.
If you want to write your own socket code for this, well - good luck with that.
Do you want your client application to be able to run on more than one OS? If so, you might want to stay clear of anything Apple specific. Although, if you strictly want to run on iOS, using MusiGenesis' suggestion could save you a ton of time.
I have found that Python and Perl are both pretty great for socket programming. I know that Python has several libraries built in for handling HTTP requests etc. If you want to run your server as a daemon, I found this code very helpful:
http://www.jejik.com/articles/2007/02/a_simple_unix_linux_daemon_in_python/
Here is a general python sockets guide:
http://docs.python.org/howto/sockets.html
Good luck.

Send messages between iPhone & Mac

I'm fairly novice in iPhone development, but trying to create what would seem a fairly simple application.
I want to have 1 program running on my phone/simulator that has a slider and a button, and another receiving program on the mac, such as Processing/Supercollider.
When the button is pressed i want a String such as "hello" to appear in the post window of the program on the mac, and when the slider is moved up/down for an integer, say between 0-99, to correspond with the movement on the phone. I'm assuming a WiFi connection would be essential for the sending of messages between devices.
Does anyone know how I might go about writing this - tutorials/code examples/links to get me started?
Cheers
cocoaasyncsocket is a great wrapper around CFSocket and CFStream, that makes networking much easier. Bonjour has great documentation at developer.apple.com
This should be done over a TCP connection which is established between your iPhone and the PC. For that to happen you need to write 2 pieces of software:
1) A client: to be installed on your iPhone
2) A server: to be installed on your PC
The server will listen to connections coming from the iPhone and once a connection is made you can send messages quite easily between the two.
This will give you a good grasp on the theory
Guide to socket programming in C
Once you have that then you can find tons of Obj-C TCP examples.

What is the best way to implement a Server-Client connection between an iPad and multiple iPhones?

Based on a college-project I'm trying to realize a relatively simple game (Poker) where an iPad acts as Server and multiple iPod-Touchs connect to it as Clients.
Gamekit seems to drop out, since those old ipod-touch-devices don't have bluetooth-support.
Are there already some Frameworks out there simplifying the process, or do I have to fall back on TCP-Streaming-Sockets and implement it myself?
For your task I suggest you have a look at ThoMoNetworking or AsyncSocket.
ThoMoNet is a very simple setup that is specifically developed for fast and easy prototyping and easy to set up. Is will automatically create a bi-partite graph between all instances of you application it finds in the local network. So If you keep your iPad as the server and the iPhones as clients this will come down to less than 10 lines of code to set up.
AsyncSocket is a commonly used framework with ports to PC as well but requires more code to write. On the other hand it will allow you to do more fancy things, should you need them.
Distributed objects are not yet available on iPhone OS, so excluding GameKit you may try using Bonjour networking. Otherwise, you may try using web services with some of the available libraries. If Bonjour and web services are not a choice/possibility, then you have to revert to old plain sockets.