Re: Doing request rate limiting with NSURLSession
Re: Doing request rate limiting with NSURLSession
- Subject: Re: Doing request rate limiting with NSURLSession
- From: Jens Alfke <email@hidden>
- Date: Wed, 10 Oct 2018 10:37:53 -0700
You can queue the requests yourself in an NSMutableArray or something. Then
issue the first one. When the task's delegate’s didSendBodyData: method is
called, schedule starting the next request (either immediately or after a delay
of ≤ 1/32 sec.)
This is a bit conservative because that delegate method won’t be called until
some time after the HTTP request is sent, but it should keep you from getting
errors.
—Jens
_______________________________________________
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