• 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
Strange CFStreamError from CFReadStreamCreateForHTTPRequest
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Strange CFStreamError from CFReadStreamCreateForHTTPRequest


  • Subject: Strange CFStreamError from CFReadStreamCreateForHTTPRequest
  • From: Dave Camp <email@hidden>
  • Date: Fri, 29 Aug 2003 16:13:40 -0700

I'm working on some code to retrieve data from an HTTP server and my read stream callback is getting kCFStreamEventOpenCompleted, and then kCFStreamEventErrorOccurred. I then call CFReadStreamGetError and get a domain of 4, and an error of -1. I've double checked that several times in the debugger, so I'm sure thats right. What is domain 4? I can't seem to find anything like that in the headers...

The code (which I have inherited) essentially looks like (abbreviated for clarity):

CFReadStreamCreateForHTTPRequest(kCFAllocatorDefault, httpRequest)
CFStreamClientContext clientContext = { 0, (void*)self, nil, nil, nil };
CFOptionFlags clientEvents = kCFStreamEventOpenCompleted
| kCFStreamEventHasBytesAvailable
| kCFStreamEventEndEncountered
| kCFStreamEventErrorOccurred;
CFReadStreamSetClient(readStream, clientEvents, StaticReadStreamClientCallBack, &clientContext)
CFReadStreamScheduleWithRunLoop(readStream, httpRunLoop, gHTTPTransactionMode);
CFReadStreamOpen(readStream)
CFRunLoopRunInMode(gHTTPTransactionMode, 1.0e10, false);


This code works fine for several preceding transactions, but fails on this one. The only unique thing is that I'm getting back more data on this call (about 3K). Using tcpdump I see the request go to the server, and the 3K of data coming back, but then I get that odd error in my callback.

Any thoughts?

Thanks,
Dave

---
It's not denial. I'm just very particular about the reality I choose to accept. -Calvin
_______________________________________________
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.
  • Follow-Ups:
    • Re: Strange CFStreamError from CFReadStreamCreateForHTTPRequest
      • From: Becky Willrich <email@hidden>
  • Prev by Date: Help! Routing breaks Classic networking?
  • Next by Date: Re: Strange CFStreamError from CFReadStreamCreateForHTTPRequest
  • Previous by thread: Help! Routing breaks Classic networking?
  • Next by thread: Re: Strange CFStreamError from CFReadStreamCreateForHTTPRequest
  • Index(es):
    • Date
    • Thread