• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Pipelining and Persistent Connection Questions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Pipelining and Persistent Connection Questions


  • Subject: Re: Pipelining and Persistent Connection Questions
  • From: Josh Graessley <email@hidden>
  • Date: Mon, 15 Oct 2012 14:50:29 -0700

On Oct 15, 2012, at 2:42 PM, David Hoerl <email@hidden> wrote:

> Currently focused on iPhone to Amazon CloudFront.net service, but asking general questions for the future.
>
> 1) As I understand it, pipelining is only going to happen if the OS can keep a TCP connection open. This feature requires a HTTP1.1 endpoint, or a HTTP1.0 that accepts (and returns) the 'Connect: keep-alive' flag.
>
> So if one does not know a priori what version the endpoint is using, is it always a good practive to stuff the 'Connect: keep-alive' flag in the header?
>
> Will a HTTP1.1 server respond with it set in the reply?
>
> If not it would appear there is no way of knowing from the response that there will in fact be a persistent connection (getting a response from a 1.0 servers is the best it can be, no?)
>
> 2) Assuming there is a persistent connection, then does setting 'setHTTPShouldUsePipelining:YES' always result in pipelining getting enabled, or is there some other exchange between iOS and the endpoint to negotiate this feature?
>
> If the answer is 'not always enabled', is there some means to determing whether its being used or not?
>
> 3) What I'd dearly love are two flags in NSURLResponse that told me if the connection was persistent and if pipelining was being used (assuming these are not equivalent).

My understanding is that setHTTPShouldUsePipelining:YES will tell the system you would like to use pipelining. If you do not do that, pipelining will not be used. If you do call setHTTPShouldUsePipelining:YES, pipelining will be used when it can be used. In cases where the server (or a proxy) can not support pipelining, it won't be used, even if you called setHTTPShouldUsePipelining:YES.

I don't know NSURLResponse well enough to know if that information is provided.

-josh


 _______________________________________________
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

  • Follow-Ups:
    • Re: Pipelining and Persistent Connection Questions
      • From: David Hoerl <email@hidden>
References: 
 >Pipelining and Persistent Connection Questions (From: David Hoerl <email@hidden>)

  • Prev by Date: Pipelining and Persistent Connection Questions
  • Next by Date: Re: Pipelining and Persistent Connection Questions
  • Previous by thread: Pipelining and Persistent Connection Questions
  • Next by thread: Re: Pipelining and Persistent Connection Questions
  • Index(es):
    • Date
    • Thread