• 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: Not getting an NSStreamEventHasBytesAvailable message
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Not getting an NSStreamEventHasBytesAvailable message


  • Subject: Re: Not getting an NSStreamEventHasBytesAvailable message
  • From: "Quinn \"The Eskimo!\"" <email@hidden>
  • Date: Mon, 13 Feb 2017 23:02:23 +0000

On 10 Feb 2017, at 04:34, Jens Alfke <email@hidden> wrote:

> Also, the examples in Apple’s “Stream Programming Guide” only issue a single read call in response to a bytes-available event.

That’s the correct approach.  Repeatedly calling `-read:maxLength:` inside your `.hasBytesAvailable` handler can cause various odd problems, not least of which is the starvation of other streams scheduled on the same run loop.

Share and Enjoy
--
Quinn "The Eskimo!"                    <http://www.apple.com/developer/>
Apple Developer Relations, Developer Technical Support, Core OS/Hardware



 _______________________________________________
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: Not getting an NSStreamEventHasBytesAvailable message
      • From: Jens Alfke <email@hidden>
References: 
 >Not getting an NSStreamEventHasBytesAvailable message (From: Jens Alfke <email@hidden>)
 >Re: Not getting an NSStreamEventHasBytesAvailable message (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: Still interested in (NS)URLSessionStreamTask
  • Next by Date: Re: Not getting an NSStreamEventHasBytesAvailable message
  • Previous by thread: Re: Not getting an NSStreamEventHasBytesAvailable message
  • Next by thread: Re: Not getting an NSStreamEventHasBytesAvailable message
  • Index(es):
    • Date
    • Thread