Re: iphone to mac .. UDP Woes ..
Re: iphone to mac .. UDP Woes ..
- Subject: Re: iphone to mac .. UDP Woes ..
- From: J P May <email@hidden>
- Date: Sat, 31 Jul 2010 10:49:08 +0200
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).
that is an excellent point, Mark ...
UDP also won't prevent the WiFi antenna from being powered off, TCP will.
True. since the protocol here is continuous (say 30hz) transmission
of a few bytes, I slackly assumed I could ignore that problem :-)
In general, I see no reason ever to go with UDP, unless you
absolutely must (your protocol requires it)
I wouldn't say the protocol requires it but,
(a) a minor issue -- UDP is perhaps a touch faster for that type of thing.
(b) moreover, the main reason I decided to go that way -- it's just plain easy!
i) two lines of bonjour code on each side to get a hostname..
ii) include the marvellous UDPEcho.h/m example class handily
provided by apple earlier this year...
you're done. Solid, simple, easy to understand every line of code...
(Dont forget, i'm going fone-to-mac ... of course for fone-to-fone I
just slackly use the gameKit, which is very easy.)
(actually the UDP process I describe above (using the handy "sockets
all done for you" UDPEcho class) is perhaps EASIER, really, than
using gamekit !)
or you _REALLY_ know what you're doing.
We can safely assume that's not the case :) rather, it seemed to
me (perhaps incorrectly) that the particular problem at hand was
suitable for a simple UDP solution .... but I did not even think
about the two issues you raise above.
80% of your debugging time will be spent trying to make UDP into TCP.
I'm sure you're right - what you say is critical .. thank you.
johnnie
_______________________________________________
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