Re: AsyncUdpSocket: Receiving duplicate UDP Packet
Re: AsyncUdpSocket: Receiving duplicate UDP Packet
- Subject: Re: AsyncUdpSocket: Receiving duplicate UDP Packet
- From: Greg Guerin <email@hidden>
- Date: Fri, 14 May 2010 09:42:22 -0700
Todd Burch wrote:
[aSyncSocket receiveWithTimeout:-1 tag:1]; //Listen for the
next UDP packet to arrive...which will call this method again in turn.
Don't start another receive.
Handle or ignore the packet, then always return NO from the delegate
method. The single outstanding receive will continue receiving
packets and passing them to the delegate. Don't return YES until you
want it to stop receiving callbacks. It seems wacky but it worked
for me.
And I used a large timeout (1.0e9), not a negative one.
-- GG
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden