[Spread-users] Some basic questions

Bus Mini micraltoo at gmail.com
Fri Jun 30 10:20:06 EDT 2006

Hello all,

I am sorry to trouble you with such basic questions, but I really confused
without someone's help.

1, According to the documentation,  a spread daemon is running in a computer
which is using Spread to communicate with other computers. Is this means
that if there were 20 computers on the LAN using Spread as a tool to
communicate, there must be 20 daemons on runing?

2, If the answer of qusetion 1 is YES, then another qusetion posed:
according to the API SP_join( mailbox mbox , const char * group ),  a group
is built on a daemons, then if a group named "No.1" built on daemon 1, a
group ALSO named "No.1" bulit on another daemon 2 which was running in other
computer, deos thses two groups are the same one?

3,Some concepts of mailbox. I conside a mailbox as something like a mail
box, and a daemon is like a post office, and a group is something like a
mailing address, you can have many mailboxs map to an address. If you want
to use Spread to communicate with others, you must register a mail first by
SP_connect. Then after you got a mailbox, you can use it to send or receive
message. And you use SP_join to declare whit which mialbox you  communicate
with (send or receive) others. And SP_multicast(mailbox mbox, service
service type, const char * group,int16 mess type, int mess len, const char *
mess ) is to say with which mailbox you'd like to send message, that means
you use this mailbox to send message NOT means you send message to this
mailbox. And SP_receive( mailbox mbox, service * service type,char
sender[MAX GROUP NAME], int max groups,int * num groups, char groups[][MAX
GROUP NAME],int16 * mess type, int * endian mismatch, int max mess len,char
* mess ) is to say which mailbox you'd like to check. That means you check
this mailbox for a message. Am I right?

4, If I were wrong, could somebody explain the relationships among in
daemon,group and mailbox?

Thanks for reading my questions, your hlep is very important to me.
Yours sincerely
Mini Bus.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.spread.org/pipermail/spread-users/attachments/20060630/6b33c64e/attachment.html 

More information about the Spread-users mailing list