Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

kCFStreamPropertyHTTPAttemptPersistentConnection



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:
http://lists.apple.com/mailman/options/macnetworkprog/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.