Jonathan Stanton jonathan at cnds.jhu.edu
Mon Mar 18 09:56:18 EST 2002

On Mon, Mar 18, 2002 at 10:54:40AM +0100, Koorosh Alahiari wrote:
> Hi All,
> Could anyone tell me what the following code segment
> in user.c mean?

By default if the buffers you pass to a SP_recv call are too short to hold the
body of the message you are receiving,or if the groups buffer is too short to
hold the list of groups or members, then the SP_recv call will return
GROUPS_TO_SHORT or BUFFER_TO_SHORT and NOT dequeue the message (so the next
time you call SP()recv you will get the SAME message). 

The idea is that you can call SP_recv again with larger buffers and
successfully get your message. 

Now you may not care about creating larger buffers and may just want to
truncate any data or groups that are too long and just get the portion of the
message at teh beginning that you have room for. That is what teh DROP_RECV
flag does. It tells SP_recv to give you as much as possible and then drop the
rest of the message.

> Why does it call another receive with the service type
> of "DROP_RECV" in this case?
The user program is just showing how to handle this event by using the


Jonathan R. Stanton         jonathan at cs.jhu.edu
Dept. of Computer Science   
Johns Hopkins University    

More information about the Spread-users mailing list