Is NSURLConnectionDataDelegate's didReceiveData method throttled?

72 views Asked by At

The docs for the connection:didReceiveData delegate method of NSURLConnectionDataDelegate say that the didReceiveData message will be sent “as a connection loads data incrementally.”

Surely, this can't mean that it didReceiveData will be sent for each and every byte that comes over the wire. Does anyone know what algorithm is used to throttle didReceiveData messages?

1

There are 1 answers

0
Tom Harrington On

In my experience that callback is invoked any time the connection receives another data packet from the network. Packet size can vary depending on network conditions but is typically a from 1 to several kB. You won't get that callback for every byte, but for large transfers you may get a lot of them.