Mailing Lists: Apple Mailing Lists

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

Re: ctl_enqueuedata() woes - FIXED



Yes, if this is a SOCK_DGRAM socket, specifying 0 will cause the
current data to be appended to the previous one in the socket
without a message boundary.  A read done on the socket will either
truncate or discard data enqueued to it after the 1st one.
That's what CTL_DATA_EOR is for, as you've already discovered.

Adi

On Oct 4, 2007, at 8:16 AM, Karl Pickett wrote:

On 10/3/07, Adi Masputra < email@hidden> wrote:
How are you calling ctl_enqueuedata() -- i.e. what are its parameters?

Adi

I was calling it with 0 for flags, as per the example code. Gee. I was wondering what CTL_DATA_EOR was for since the example didn't use it.

It looks like my code and the example code would be better off using CTL_DATA_EOR :)

I tested it, that was indeed the problem.  Thanks!

--
Karl Pickett
"They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -- Benjamin Franklin
"Eternal vigilance is the price of liberty." -- Wendell Phillips
"One man with courage makes a majority." -- Andrew Jackson, 1832

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/darwin-kernel/email@hidden

This email sent to email@hidden

References: 
 >Re: ctl_enqueuedata() woes - FIXED (From: "Karl Pickett" <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.