Home Javatutorials Multicasting in Java - java tutorials,tutorial



Multicasting in Java - java tutorials,tutorial
Posted on: April 18, 2011 at 12:00 AM
multicasting in java

Multicasting in Java

In a datagram network, Multicast is the transmission of the data packet to the multiple destination. The advantage of multicast is that you can send down its data to a group of hosts sharing a common address. If we are not using Multicast, then we need to send the data packets one for each host.

Sending Multicast datagrams

In order to send any kind of datagram in Java, be it unicast, broadcast or multicast, one needs a java.net.DatagramSocket :

DatagramSocket socket = new DatagramSocket();

The word "Multicast" is typically used to refer to IP Multicast, which is a protocol for efficiently sending to multiple receivers at the same time on TCP/IP networks, by use of a multicast address.

One can optionally supply a local port to the DatagramSocket constructor to which the socket must bind. This is only necessary if one needs other parties to be able to reach us at a specific port. A third constructor takes the local port AND the local IP address to which to bind. This is used (rarely) with multi-homed hosts where it is important on which network adapter the traffic is received.

For more details Click the link below :

Multicast in Java

UDP Multicast Client in Java

Multicast Server in Java

 

Related Tags for Multicasting in Java - java tutorials,tutorial:


More Tutorials from this section

Ask Questions?    Discuss: Multicasting in Java - java tutorials,tutorial  

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.