Page 1 of 1

JOIN 46505

Posted: April 12, 2005, 6:29 pm
by M&B
When someone sends us a RQST or JOIN, we're supposed to respond with a randomly chosen peer ip and port. However, what do we reply with if we don't have any other peers?

If we assume upon trying to connect to another peer that the connection isn't truly established until we receive this JOIN response, then we can't ever really be fully established. This seems like kind of a problem since every network will start with one peer connecting to one other peer.

Posted: April 12, 2005, 6:52 pm
by M&B
That goes for the NEIGHBOR response as well, when there are no neighbors.

Posted: April 13, 2005, 5:41 pm
by jaf656s
In this case there is nothing else to do but not return a peer.

We have updated the specification to include this case. The solution is to respond with an empty PEER message which is as follows:

PEER
*

This message will validate the RQST or JOIN message, but also indicate that that client has no peers to share.

As for the NEIGHBOR message,
E) Prune responses are generated whenever a prune message is received.
As described in section D, prune messages include a list of all of
the connected peers
.
Since the client must have been connected, at least, to the peer that issued the PRUNE message, then there will never be an empty set of peers to draw a NEIGHBOR set.

Jason and Kirk