kCFStreamPropertyHTTPAttemptPersistentConnection
kCFStreamPropertyHTTPAttemptPersistentConnection
- Subject: kCFStreamPropertyHTTPAttemptPersistentConnection
- From: Marc Epard <email@hidden>
- Date: Tue, 15 Jun 2004 10:47:20 -0500
I'm using CFNetwork for HTTP and I'd like to have persistent connections
because I'm doing several transactions in a row. Before calling
CFReadStreamOpen, I do this:
bool isPersistent = CFReadStreamSetProperty(responseStream,
kCFStreamPropertyHTTPAttemptPersistentConnection,
kCFBooleanTrue);
I've verified that isPersistent is true, but CFNetwork is still closing the
TCP stream after each transaction.
I'm making sure to read the entire response. I've tried keeping a reference
to a stream around and not releasing it each time and I've tried not calling
CFReadStreamClose. Still, CFNetwork closes the stream.
I've used tcpdump and tcpflow to verify that both ends are including the
Connection: Keep-Alive header and determined that it is the CFNetwork end
that initiates the TCP close rather than the server. This is on 10.3.4.
Any suggestions?
Thanks.
-Marc
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.