• 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: Reading HTTP headers (was Re: cfsockets vs OT)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Reading HTTP headers (was Re: cfsockets vs OT)


  • Subject: Re: Reading HTTP headers (was Re: cfsockets vs OT)
  • From: Mike Cohen <email@hidden>
  • Date: Tue, 6 Jan 2004 16:40:11 -0500

On Jan 6, 2004, at 2:59 PM, Becky Willrich wrote:


What he said - read in a big chunk, scan over the bytes read, and then somehow save the excess bytes (which presumably are part of the body of the response). If you are reading byte by byte, that will definitely explain the performance hit moving from OT to BSD sockets - OT is probably doing the buffering for you.


The approach I like to use with OT is have my asynchronous notifier read all available data on any T_DATA event & place it in a buffer. My other thread watches for new data and will read it from the buffer as needed. with BSD sockets, you could probably do the same by having a thread call select and read any available data into your buffer.
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.
References: 
 >Reading HTTP headers (was Re: cfsockets vs OT) (From: Larry Gerndt <email@hidden>)
 >Re: Reading HTTP headers (was Re: cfsockets vs OT) (From: Joseph Kim <email@hidden>)
 >Re: Reading HTTP headers (was Re: cfsockets vs OT) (From: Becky Willrich <email@hidden>)

  • Prev by Date: Re: Reading HTTP headers (was Re: cfsockets vs OT)
  • Next by Date: Re: Reading HTTP headers (was Re: cfsockets vs OT)
  • Previous by thread: Re: Reading HTTP headers (was Re: cfsockets vs OT)
  • Next by thread: Re: Reading HTTP headers (was Re: cfsockets vs OT)
  • Index(es):
    • Date
    • Thread