File: NullDestAddresses.txt

package info (click to toggle)
libjgroups-java 2.12.2.Final-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 8,712 kB
  • sloc: java: 109,098; xml: 9,423; sh: 149; makefile: 2
file content (20 lines) | stat: -rw-r--r-- 1,059 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

Nulling of destination addresses for optimized marshalling
==========================================================

Author: Bela Ban
Date: Aug 26 2005

When we marshall a message (org.jgroups.Message), we can transmit a null value for the destination, because
the receiver can determine the destination:
- for UDP: if received on the multicast receive socket, the destination is the multicast address (same as null)
           if received on the unicast receive socket, the destination is the local_addr (ourself)
- for TCP: we use the MULTICAST byet sent with the message when unmarshalling the message:
           - if true, we leave the deatination null (= multicast destination)
           - if not set, we set the destination to the address passed to use from the ConnectionTable

This requires that when marshalling a message, we send a multicast byte with each Message (or once for bundled msgs)
based on the destination address !

Note that we *cannot* modify the destination address in the message itself, otherwise retransmissions might fail !