Search code examples
macosnsurlsessionbandwidth-throttling

NSURLSession bandwidth limiting


Is there a way to limit the bandwidth in NSURLSession?

I'm making file-sync-client for macOS like Dropbox/GoogleDrive/pCloud and they all have bandwidth limiting options, but I'm not sure how to configure NSURLSession to respect bandwidth limiting.


Solution

  • Looks like ASIHTTPRequest features Bandwidth throttling support. Although it may be an old library, from what I observe it's still fully functional thus it may be worth exploring.

    Of course, using ASIHTTPRequest would require abandoning NSURLSession for this purpose.