You are on page 1of 5

Multicast Socket

Multicast Socket
The multicast datagram socket class is useful for
sending and receiving IP multicast packets. A
MulticastSocket is a (UDP) DatagramSocket, with
additional capabilities for joining "groups" of other
multicast hosts on the internet.
Multicast socket sends data from one host to many
different hosts, but not to everyone; the data goes
only to clients that have expressed and interest in
the data by joining a particular multicast group

With Multicast Sockets

Without Multicast Sockets

Client

Router

The Internet
Router

Server

the simplest possible multicast configurations

Multicast Addresses and Groups

A multicast address is the shared address of a group of


hosts called a multicast group.
Multicast addresses are IP addresses in the range 224.0.0.0
to 239.255.255.255. They are called Class D addresses
A set of Internet hosts that share a multicast address.
to create a new multicast group is pick a random address
from 225.0.0.0 to 238.255.255.255
Any data sent to the multicast address is relayed to all the
members of the group.
Membership in a multicast group is open; hosts can enter
or leave the group at any time.
Groups can be either permanent or transient.
A multicast group consists of both a multicast address and
a port number

Four Step Operations Of Multicast Group

Join a multicast group

Send data to the member of the multicast group

Receive data from the multicast group

Leave the multicast group

You might also like