/
NullDestAddresses.txt
21 lines (15 loc) · 1.11 KB
/
NullDestAddresses.txt
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
==========================================================
Version: $Id: NullDestAddresses.txt,v 1.2 2005/08/26 11:06:37 belaban Exp $
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 !