LWN.net Logo

OT

OT

Posted Mar 29, 2006 20:24 UTC (Wed) by guinan (subscriber, #4644)
In reply to: OT by tjc
Parent article: The Grumpy Editor's guide to RSS aggregators

I don't mind sharing, but are you writing in C, Python, other?

Do you know ahead of time how many bytes you want to receive?

If the length is embedded in the data stream, you might as well recv() as much as you can, to avoid extra system calls. But if there's another message behind the first one, you might end up reading into that, in which case you should keep ahold of the "remainder" for the next call.

Email me guinan@bluebutton.com if you want to take it offline.


(Log in to post comments)

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds