[Spread-users] Identifying the sender

Gustavo Castro comadreja_98 at hotmail.com
Wed Aug 18 10:35:34 EDT 2004


Hum, i see what you say, but the problem is that i´m using the Java 
interface for the spread. In order to receive, you do
SpreadMessage message = connection.receive();
with no calling to the SP_receive, and i don´t find out how to identify the 
sender. There is this method, getSender, but according to the definition it 
"Gets the message sender's private group." which would return me all the 
members of the group, that is, A, B, C, D and E.
What am i missing?

Thank you so much!!

>From: Jonathan Stanton <jonathan at cnds.jhu.edu>
>To: Gustavo Castro <comadreja_98 at hotmail.com>
>CC: spread-users at lists.spread.org
>Subject: Re: [Spread-users] Identifying the sender
>Date: Wed, 18 Aug 2004 09:18:25 -0400
>
>The Spread documentation for the SP_receive call explains what all of the
>fields are. You can find it in the man pages installed with Spread or on
>the web site at www.spread.org/docs/docspread.html in the Users Guide or
>online man pages.
>
>Specifically, the 'sender' field that is returned to you in the SP_receive
>call holds the private name of the process who sent the message. That name
>will be structured as "#username#daemonname" where 'username' is the name
>each client passed to the SP_connect call (in your case it would be A, B,
>C, D, or E) and the 'daemonname' is name of the daemon that the process
>connected to.
>
>You can differentiate between multicast and unicast messages by looking at
>the "groups" array returned in the SP_receive call. It lists all of the
>groups and individuals who received the message. So if the only group name
>listed is your personal private group name ("#A#machine1") then it was a
>unicast message to you, if one or more  regular group names are in the
>field then it was a multicast sent to all of those groups.
>
>If you are using an API wrapper for a language other then C, the syntax
>might be slightly different but the content and ideas are the same.
>
>Cheers,
>
>Jonathan
>
>On Wed, Aug 18, 2004 at 11:20:57AM +0000, Gustavo Castro wrote:
> > Hello, i´m a newbie with the spread, so this question should be easy. I
> > have a spread group, let´s call it "Test" with 5 members, name A, B, C, 
>D
> > and E. If one of the members send a message, how can i know who is the
> > sender? I mean, if A sends a message and E receives it, how can E 
>possibly
> > know that A was the sender? And if it was a multicast?
> > Thanks in advance!
> >
>
>--
>-------------------------------------------------------
>Jonathan R. Stanton         jonathan at cs.jhu.edu
>Dept. of Computer Science
>Johns Hopkins University
>-------------------------------------------------------

_________________________________________________________________
¿Estás pensando en cambiar de coche? Todas los modelos de serie y extras en 
MSN Motor. http://motor.msn.es/researchcentre/





More information about the Spread-users mailing list