Multicasting


Introduction

           Multicasting involves sending a packet of data to more than one destination. Generally a node on a network can send data to a single node only and if it has to send data to 'N' nodes it has to send 'N' copies of the data. When multicasting is used you can send just one copy of data to all the clients meant to receive that packet. Multicasting is useful in the construction of truly distributed applications especially real-time audio and video conferencing. (Check out the MBone which is exploring IP multicast applications).

More about Multicasting?


QUANTA classes used

    QUANTAnet_mcast_c

                A client can be created using this class. Call the init() method first, with the multicast IP address and the port number. Then you can use the send() or receive() methods to comunicate with the mcast group.
 


Usage

 1. On machine 1 type
          newclient 225.0.0.37 7777 hello

  2. On machine 2 type
            newclient 225.0.0.37 7777 there

Output

       At each client you will see the Self Address and Port, Multicast Send Address(225.0.0.37)and Port (7777) and Receive Address and Port. The message is also transmitted.
          In the above example,client 1 receives the message 'there' from client 2 and client 2 receives the message 'hello' from client 1. Note that the Receive address on client 1 is the Self address of client 2 which clearly shows that data transmission has taken place.

for more information: Post your questions online on the Quanta forum page.