• 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
CFReadStream and keep-alive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CFReadStream and keep-alive


  • Subject: CFReadStream and keep-alive
  • From: John Michael Zorko <email@hidden>
  • Date: Wed, 20 Jan 2010 15:38:54 -0800

Hello, all ...

I want to adapt some CFReadStream-based code I have to keep a persistent connection to the server so that additional requests won't incur the overhead of establishing a new connection. Currently, I just create a CFReadStream by creating a CFHTTPMessage with CFHTTPMessageCreateRequest, and passing that request to CFReadStreamCreateForHTTPRequest(). This works fine, but I want to be able to send additional HTTP requests without closing the connection to the server and opening it again. I've a couple of questions, though:

1. How to I keep the connection open once my callback gets called with kCFStreamEventEndEncountered?

2. It is my understanding that every new HTTP request needs a new CFReadStream, so how do I tell the CFReadStream to _not_ initiate a new connection, but rather, keep using the current one?

3. Is setting the HTTP keep-alive header to the correct value all I need to do, or do I need to do something else?

Regards,

John


 _______________________________________________
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: CFReadStream and keep-alive
      • From: Quinn <email@hidden>
  • Prev by Date: Re: NSURLDownload and web sharing server
  • Next by Date: Re: CFReadStream and keep-alive
  • Previous by thread: Re: NSURLDownload and web sharing server
  • Next by thread: Re: CFReadStream and keep-alive
  • Index(es):
    • Date
    • Thread