0

I'm working on an app with which speed is absolutely crucial. We use a UDP connection over a dedicated wifi (no public internet, same room wifi).

In general a wifi connection should be able to deliver a 512byte package within less than 1ms. For some reason recvfrom in our case is taking 2.5-4.5ms until we get the package.

I've done all the digging and research to optimize the connection settings as far as possible. (thresholds for receiving etc.)

Does anyone experience similar issues or has an idea how to address this? I realize that as a smartphone there is a lot going on at the network level, but in this case we even tried Airplane-Mode and still had the same issue.

I'd switch to RAW sockets, but Apple is not allowing that - so we need to work around that.

I'm thankful for any ideas!

Best, Ralph

1 Answers1

0

Check to see if the speed issue is consistent or just on the initial connection. I've seen a number of issues in the past with a lag establishing a connection, as the device 'wakes up' the communications link.

Dominic
  • 258
  • 2
  • 8
  • Consistent, we use it for media data transmission (video, audio etc.) and it is a continual stream of data. Connection is kept alive on both ends the whole time. – Ralph Küpper Jun 02 '16 at 19:10
  • Unfortunately too spread out in the code... However, I'm more interested in a general solution/approach for this. We are doing "okay", but I'd rather put a "great" mark on it. – Ralph Küpper Jun 07 '16 at 20:46