Re: Qestions about CFHTTP: asynchronous communication mechanism
Re: Qestions about CFHTTP: asynchronous communication mechanism
- Subject: Re: Qestions about CFHTTP: asynchronous communication mechanism
- From: "Alex Guo" <email@hidden>
- Date: Mon, 6 Dec 2004 16:09:07 +0800
Re: Qestions about CFHTTP: asynchronous communication mech>A CFHTTPStream is
layered on top of the CFStream base 'class'. Each CFStream has a status
value, of type CFStreamStatus (in ><CoreFoundation/CFStream.h>). You can
get the current status of a stream using CFRead/WriteStreamGetStatus. You
can ask to be notified of status changes >by installing the stream on your
runloop. This involves:
>o calling CFRead/WriteStreamSetClient to specify your callback function and
what events you're interested in; these events are defined by
CFStreamEventType >and include kCFStreamEventOpenCompleted,
kCFStreamEventHasBytesAvailable, and kCFStreamEventCanAcceptBytes
>o calling CFReadStreamScheduleWithRunLoop to install your stream on the
runloop so that it can call your callback
Thank you very much for your support.
I now understand the mechanism.
>My guess is that this is less fine-grained than you were looking for; can
you tell us what sort of events you're interested in?
1. If the web server is non-existing, how can I tell it by interpret the
error code ?
2. If the SSL certificate error (such as expiration), how do I know that?
_______________________________________________
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