• 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: What causes a kCFStreamEventEndEncountered
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What causes a kCFStreamEventEndEncountered


  • Subject: Re: What causes a kCFStreamEventEndEncountered
  • From: Jens Alfke <email@hidden>
  • Date: Sun, 13 Jul 2008 11:29:36 -0700


On 13 Jul '08, at 11:13 AM, Liwei wrote:

I have a feeling that as long as the stream manages to write
everything I've sent it when kCFStreamEventCanAcceptBytes is brought
up, it considers the stream to be at its end. Then it looks like I can
only use streams in a "transactional" way, like how its being used in
CFFTP and CFHTTP.

No, that's not true. The stream will stay open until one side or the other closes the socket.

Check your code to make sure you're really getting the end-encountered call. It might be misinterpreting the flag bits, or falling through a case, or something like that.

You may also want to check out Apple's CocoaEcho sample code, or my MYNetwork library, which is a descendant of it. (The latter includes abstract TCPListener and TCPClient classes, which take care of the stream details for you.)

—Jens

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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

  • Follow-Ups:
    • Re: What causes a kCFStreamEventEndEncountered
      • From: Liwei <email@hidden>
References: 
 >What causes a kCFStreamEventEndEncountered (From: Liwei <email@hidden>)
 >Re: What causes a kCFStreamEventEndEncountered (From: Jens Alfke <email@hidden>)
 >Re: What causes a kCFStreamEventEndEncountered (From: Liwei <email@hidden>)

  • Prev by Date: Re: What causes a kCFStreamEventEndEncountered
  • Next by Date: Re: What causes a kCFStreamEventEndEncountered
  • Previous by thread: Re: What causes a kCFStreamEventEndEncountered
  • Next by thread: Re: What causes a kCFStreamEventEndEncountered
  • Index(es):
    • Date
    • Thread