next up previous contents
Next: Getting the local address Up: Channel Previous: Setting options   Contents

Connecting to a channel

When a client wants to join a group, it connects to a channel giving the name of the group to be joined:

    public void connect(String groupname) throws ChannelClosed;

The group address is a string, naming the group to be joined. All channels that are connected to the same group (same name) form a group. Messages multicast on any channel in the group will be received by all members (including the one who sent it3.3).

The method returns as soon as the group has been joined successfully. If the channel is in the closed state (see fig. 3.2), an exception will be thrown. If there are no other members, i.e. no other client has connected to a group with this name, then a new group is created and the member joined. The first member of a group becomes its coordinator. A coordinator is in charge of multicasting new views whenever the membership changes3.4.



Bela Ban 2002-11-16