Based on Example1Receiver.java, create a program Example1aReceiver.java which joins a multicast group of a different IP address (e.g., 239.1.2.4) but the same port. Compile Example1bReceiver.java. Start two or more Example1Receiver processes first, then a Example1a Receiver process, and then a Sender process with a message of your choice. Does the Example1bReceiver process receive the message? Describe and explain the outcome.
This exercise is based on Example1 presented in this chapter.
When a multicast address 239.1.2.4 was specified (instead of 239.1.2.3) in Example1aReceiver, the message is received by Example1Receiver but not Example1aReceiver.
Example1aReceiver does not receive the message sent to the mutlicast group that the sender sends to: In Java multicast, the multicast group is identified by the IP multicast address and a port number. Since Example1baReceiver uses a different multicast address (although the same port number), it is not considered to be in the sender’s group.
You might also like to view...
All possible operations for Alice objects are predefined as methods for programmer use.
Answer the following statement true (T) or false (F)
The method trim of the String class trims off:
a. Leading white space b. Trailing white space c. Leading and trailing white space d. Blanks
The ________ keystroke moves the selection to the previous field in the table
A) Shift + Tab B) Page Down C) Tab D) PageUp
What type of selection structure occurs when there are one or more actions to be taken only when its condition evaluates to true?
A. dual-alternative B. if/else C. single-alternative D. conditional block