Re: receiving data with soreceive
site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com On May 14, 2005, at 15:22, Bijoy Thomas wrote: Are you calling soreceive in an so upcall? If so, try setting MSG_DONTWAIT in the flags, and that should give you everything that is in the so buf at that point. MSG_DONTWAIT tells the socket not to block. For the auio resid, use M_COPYALL. Cheers, Justin -- Justin C. Walker, Curmudgeon-At-Large Institute for General Semantics -------- If you're not confused, You're not paying attention -------- _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a... What do you mean by so upcall? An "upcall" is techno-speak for a procedure call that, in a sense, reverses the usual flow of control in, say, a network stack. It's also known as a callback, and is a procedure call initiated on the occurrence of an event, e.g., an incoming packet. The procedure to call is usually registered with some kind of call; it's part of the new KPI for sockets, for example. This is an alternative, but keep in mind that using this means that your code has to make sure all the data you need is in place, essentially by reconstructing the incoming packet byte-by-byte (i.e., you need to make sure enough bytes are present to form a valid header so you can read the length, so you can make sure enough bytes are present to process the rest of the packet, ....). It also means you are polling for data, which may not be the best idea. This email sent to site_archiver@lists.apple.com
participants (1)
-
Justin Walker