listener missing lots of udp broadcasts
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