kCFStreamPropertyHTTPAttemptPersistentConnection
kCFStreamPropertyHTTPAttemptPersistentConnection
- Subject: kCFStreamPropertyHTTPAttemptPersistentConnection
- From: "Tommy Tian" <email@hidden>
- Date: Mon, 27 Mar 2006 18:26:38 -0800
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.
this message is post by other mac devloper.I have same issue by now.
also I use tcpflow and tcpdump tool to check it:
Bfore set kCFStreamPropertyHTTPAttemptPersistentConnection.
192.168.205.086.55209-017.254.000.091.00080: GET / HTTP/1.1
User-Agent: CFNetwork/1.1
Connection: close
Host: www.apple.com
Ater set kCFStreamPropertyHTTPAttemptPersistentConnection
192.168.205.086.55204-017.254.000.091.00080: GET / HTTP/1.1
User-Agent: CFNetwork/1.1
Connection: keep-alive
Host: www.apple.com
but TCP stream still be closed.
any comments is welcome!
Thanks
-tommy
_______________________________________________
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