Re: iphone to mac ..
Re: iphone to mac ..
- Subject: Re: iphone to mac ..
- From: Mark Pauley <email@hidden>
- Date: Fri, 30 Jul 2010 14:22:01 -0700
Be aware that the UDP machinery may not start a WiFi connection if one isn't already up (you may need to test to verify that it does). UDP also won't prevent the WiFi antenna from being powered off, TCP will. In general, I see no reason ever to go with UDP, unless you absolutely must (your protocol requires it) or you _REALLY_ know what you're doing. 80% of your debugging time will be spent trying to make UDP into TCP.
_Mark
On Jul 29, 2010, at 9:52 PM, J P May wrote:
>> Well, TCP is old, but not out of date.
>> My choice usually is to set up a simple Ruby WebService server, and talk to that by http
>
> Alex, in this case I am sending a couple of bytes repeatedly say 30 times a second. (typical game controls) So I assumed (perhaps incorrectly, but that's what i assumed) a httpesque approach would not be ideal. (And, I did not know anyway there was an easy way to set up a Ruby WebService on 10.6/iphone - thanks for the tip)
>
>
>> The best solution I've found is BLIP, by Jens Alfke.
>> Not sure if that's exactly what you're looking for, but, it is a replacement for the TCPServer sample code.
>
> Brad, you're right, BLIP generally saves the day! I guess it is the new TCPServer sample code. In this case I thought a simpler, lighter approach might be better. And in fact I have found.......
>
>
> there is actually a NEW !! sample code from Apple in 2010 ... UDPEcho
>
> Yay, Apple!
>
>
> it's great .. one file, one class, it gives you reliable code to set up a UDP socket. so, we're gonna experiment with that a little.
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Macnetworkprog mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden