• 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
RE: How to safely break read stream?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: How to safely break read stream?


  • Subject: RE: How to safely break read stream?
  • From: Chris Gardner <email@hidden>
  • Date: Tue, 26 May 2009 11:51:54 +0800
  • Importance: Normal

> To: email@hidden
> From: email@hidden
> Date: Mon, 25 May 2009 10:46:40 -0700
> Subject: Re: How to safely break read stream?
>
> Chris Gardner wrote:
>
> > I create a read stream with CFReadStreamOpen(),
> > but I don't know how to safely break it.
> > Eagerly waiting for your reply.
>
>
> Eagerly waiting for your explanation of what you mean by "break".
>
> Do you mean "to interrupt normal reading"?
>
> Do you mean "to separate into sections"?
>
> Do you mean something else?
>
> Please describe what you are doing with the read stream, and what you
> want to accomplish. Then describe what "break" means in reference to
> the rest of what you are doing.
>
> -- GG
>



Hi GG,
Thanks for your reply.
In your mailing list, you suggest me demonstrating what I want to do,
so now I am describing it in detail, please see below.
I want to receive data from FTP servers over a network with CFFTP API,
and can safely stop transferring data at any time.

Firstly, create the stream using CFReadStreamCreateWithFTPURL().
Secondly, set up my callbacks with CFReadStreamSetClient().
Thirdly, add it to the run-loop with CFReadStreamScheduleWithRunLoop().
Finally, open the stream with CFReadStreamOpen().
I'll get call-backs when information is available to be read.

I can accomplish receiving data from FTP servers successfully.
When transferring data, I stop it using CFReadStreamUnscheduleFromRunLoop()
and CFReadStreamClose().
When I am resuming to connect the same file in FTP servers, I always get
the same problem which show error code 530 that meams user not logged in.
However, I can connect other files in FTP servers successfully.

I guess the reason why I can not connect the same file again is that I did not
interupt the read stream safely.

So my question is...How can I resume to connect and receive data from the same file
in FTP servers or how can I interupt the read stream safely.

Here is my msn identifier email@hidden if you could add me.
Waiting for your reply.

Best Regards,
Chris.




























> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden


_________________________________________________________________
Windows Liveā„¢: Keep your life in sync. Check it out!
http://windowslive.com/explore?ocid=TXT_TAGLM_WL_t1_allup_explore_012009_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: How to safely break read stream?
      • From: Christian Weykopf <email@hidden>
References: 
 >Re: How to safely break read stream? (From: Greg Guerin <email@hidden>)

  • Prev by Date: Re: NSTreeController and CoreData question
  • Next by Date: Re: How to safely break read stream?
  • Previous by thread: Re: How to safely break read stream?
  • Next by thread: Re: How to safely break read stream?
  • Index(es):
    • Date
    • Thread