• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: AsyncUdpSocket: Receiving duplicate UDP Packet
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Re: new to cocoa
  • Next by Date: Re: how to terminate first AlertPanel when second AlertPanel appears?
  • Previous by thread: Re: AsyncUdpSocket: Receiving duplicate UDP Packet
  • Next by thread: Noise in CALayer
  • Index(es):
    • Date
    • Thread