site_archiver@lists.apple.com Delivered-To: macnetworkprog@lists.apple.com 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 (Macnetworkprog@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/macnetworkprog/site_archiver%40lists.... This email sent to site_archiver@lists.apple.com