• 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
listener missing lots of udp broadcasts
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

listener missing lots of udp broadcasts


  • Subject: listener missing lots of udp broadcasts
  • From: Michael Brian Bentley <email@hidden>
  • Date: Wed, 25 Dec 2013 23:17:24 -0800

What is the percent of typical missed packets can I expect from my listener when I have a device broadcasting 100-byte UDP messages at one second intervals over WIFI? I'm seeing above 10%, sometimes well above. I know UDP isn't guaranteed delivery, but what I'm seeing seems excessive.

I'm using CFSocketCreate to create a CFSocketRef that is then used in CFSocketCreateRunLoopSource to create a runLoopSource, which is then added to the current run loop.

CFRunLoopAddSource(	CFRunLoopGetCurrent(),
			self.runLoopSource,
			kCFRunLoopCommonModes);

I configure the socket with setsockopt for SO_REUSEPORT, and give it the broadcast address.

The callback (kCFSocketDataCallBack) seems to work, except it misses a lot of broadcasts.

I'm new to run loops and am reading up on them. Do I need to arrange the listener to have its own thread?

Thanks,

-Mike
_______________________________________________
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


  • Follow-Ups:
    • Re: listener missing lots of udp broadcasts
      • From: Jens Alfke <email@hidden>
    • Re: listener missing lots of udp broadcasts
      • From: Michael Brian Bentley <email@hidden>
  • Prev by Date: Re: streams/sockets slow to close?
  • Next by Date: Re: listener missing lots of udp broadcasts
  • Previous by thread: Re: streams/sockets slow to close?
  • Next by thread: Re: listener missing lots of udp broadcasts
  • Index(es):
    • Date
    • Thread