On Tue, 8 Jan 2008, Tom Spink wrote:In do_producer(), there are the following lines in the main loop: /* Send random lengths of data */ messages[i].length = (rand() % MAXLEN) + sizeof(size_t); iov[i].iov_len = messages[i].length; The entire "struct sockmsg" is sent across the socket, so the first size_t in each message contains the length of the entire message (including the size_t). This size gets picked up at the recv(...,MSG_PEEK) line in do_consumer(). Thanks, Brent -- Brent Casavant All music is folk music. I ain't bcasavan@sgi.com never heard a horse sing a song. Silicon Graphics, Inc. -- Louis Armstrong --
| david | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Greg Kroah-Hartman | [PATCH 001/196] Chinese: Add the known_regression URI to the HOWTO |
| Justin C. Sherrill | Mailing list archive |
| Ingo Molnar | [patch 08/13] syslets: x86, add move_user_context() method |
git: | |
| Steven Rostedt | Re: -rt scheduling: wakeup bug? |
| David Miller | [GIT]: Networking |
| Jarek Poplawski | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
