Mailing Lists: Apple Mailing Lists

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

blocking on recv saves a copy op?



I just upgraded my app from OpenTransport to BSD sockets + pthreads, and
found it easier than expected.  Now, I am wondering about a basic aspect of
socket operation.  If I wait on select (or kqueue event) to signal the
arrival of (UDP) data before calling recvfrom, is that going to cost an
extra memory copy, versus having the socket block on recvfrom?

On the face of it, it seems like giving the socket a destination buffer
before the data arrives might save a copy.  Or, is there some internal copy
that must occur in any case that would be postponed until recvfrom is
called?

I know, I should look in Stevens.  Just got back from 2 bookstores, both of
whom have it on backorder.

Tim

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/macnetworkprog/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.