Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

General Guidelines on bulk data through Posix Sockets



Folks.

I have an app which communicates to another remote app via a posix socket.

Previously the communication has been very small messages, up to 10 bytes or so, back and forth.

Now one app is requesting a piece of larger data from the other app (30k Bytes), and I have noticed that the communication is a less smooth.

In particular, whereas previously I could read 1 byte blocking, then continue reading until 'read' returned-1 (which would be the end of the reply), I now see a return of -1 part way through the 30k reply, and it picks up again later.

Before I rework this code to deal with this, I wanted to get any general guidelines on the best way to handle exchange of larger packets of data via sockets.

Any particular tricks ?  pitfalls ?

Thanks

Mark Gilbert.
--
email@hidden
Tel: +44 208 340 5677
fax: +44 870 055 7790
http://www.gallery.co.uk
New Product ! - MetaCorder
Location Sound Field Recorder
http://www.metacorder.info
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/darwin-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.