[Spread-users] Spread mailboxes

Joshua Goodall joshua at roughtrade.net
Wed Sep 5 23:10:33 EDT 2001


On Wed, 5 Sep 2001, Roy Tromble wrote:

> The only thing that doesn't make sense, then, is why all the other Spread
> calls take just the mailbox, and not the private group name.  Is it the case
> that when a single application makes multiple connections to Spread, the
> mailboxes (and also private names) will have unique numbers, but that Spread
> determines which application is making the call, to associate with the
> mailbox?
>
> Roy

You must be careful to differentiate the Spread daemon from the library.

The library uses the mailbox as a convenient unique identifier. The daemon
itself will never see the client's mailbox number, which is just a file
descriptor.

The daemon uses its internal socket fd to tell connections apart and does
not attempt to recognise the case where an application makes multiple
connections (i.e. multiple private names).

The mailbox is 3 simply because the fd's 0,1,2 are commonly stdin, stdout
& stderr respectively, and most Unices pick the lowest available integer.

J







More information about the Spread-users mailing list