• 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: TCP sockets with Bonjour-discovered address
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: TCP sockets with Bonjour-discovered address


  • Subject: Re: TCP sockets with Bonjour-discovered address
  • From: Carl Hoefs <email@hidden>
  • Date: Tue, 15 Jul 2014 10:00:13 -0700

On Jul 15, 2014, at 9:49 AM, Quinn The Eskimo! <email@hidden> wrote:

> However, my expectation is that the documentation /demonstrates/ 1 KiB reads and writes, in which case that's just an example.  In general doing I/O in larger blocks results in better performance, and this is no exception.

Yes, you are quite correct! The Stream Programming Guide chooses 1024-byte blocks in its example code, for reasons which aren't explained. "Then it declares a buffer of a certain size (1024 bytes, in this case) and invokes the stream object’s read:maxLength: method." I erred in assuming there was some magic in the number (with networking code, sometimes there is). Your general guideline about doing I/O in larger blocks is borne out by what I'm seeing during testing. Nice to know I'm not wandering totally out of the ballpark just yet...
Thx,
-Carl


 _______________________________________________
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


References: 
 >TCP sockets with Bonjour-discovered address (From: Carl Hoefs <email@hidden>)
 >Re: TCP sockets with Bonjour-discovered address (From: Jens Alfke <email@hidden>)
 >Re: TCP sockets with Bonjour-discovered address (From: Josh Graessley <email@hidden>)
 >Re: TCP sockets with Bonjour-discovered address (From: Jens Alfke <email@hidden>)
 >Re: TCP sockets with Bonjour-discovered address (From: Josh Graessley <email@hidden>)
 >Re: TCP sockets with Bonjour-discovered address (From: Carl Hoefs <email@hidden>)
 >Re: TCP sockets with Bonjour-discovered address (From: Jens Alfke <email@hidden>)
 >Re: TCP sockets with Bonjour-discovered address (From: Carl Hoefs <email@hidden>)
 >Re: TCP sockets with Bonjour-discovered address (From: "Quinn \"The Eskimo!\"" <email@hidden>)
 >Re: TCP sockets with Bonjour-discovered address (From: Carl Hoefs <email@hidden>)
 >Re: TCP sockets with Bonjour-discovered address (From: "Quinn \"The Eskimo!\"" <email@hidden>)

  • Prev by Date: Re: TCP sockets with Bonjour-discovered address
  • Next by Date: Using NSURLSession for uploading lots of prioritized files
  • Previous by thread: Re: TCP sockets with Bonjour-discovered address
  • Next by thread: Question on NSOutputStream -write:maxLength:
  • Index(es):
    • Date
    • Thread