Java Reference
In-Depth Information
of 192.0.2.1, a local address. Each local address that is assigned to an InfiniBand ad-
aptor should be specified with a bind rule in the configuration file. The first connect
rule in the configuration file specifies that SDP should be used whenever connecting to
the IP address of 192.0.2.*, using a port of 1024 or greater.
connect 192.0.2.0/24
1024-*
This rule uses some special syntax that should be noted. Specifically, the /24 suf-
fix of the IP address indicates that the first 24 bits of the 32-bit IP address should match
a specified address. Because each portion of an IP address is eight bits, this means that
the 192.0.2 should match exactly, and the final byte can be any value. The dash -*
within the port identifier specifies the range of 1024 or greater because the wildcard
character is used. The third and fourth connect rules in the configuration file specify
that SDP should be used with the hostname of myserver.org and a port of 8080 or
1521 .
Next, in order to enable SDP, the -Dcom.sun.sdp.conf property should be
specified along with the location to the SDP configuration file when starting the applic-
ation. Also, notice in the solution that the property -
Djava.net.preferIPv4Stack is set to true . This indicates that the IPv4 ad-
dress format will be used. This is necessary because IPv4 addresses mapped to IPv6 are
currently not available in the Solaris OS or under Linux.
Although the SDP is available only with Solaris or Linux, it is a nice addition to the
JDK for users of those platforms. Any performance booster is always viewed as a bo-
nus, and the solution to this recipe certainly falls into that category.
21-4. Broadcasting to a Group of Recipi-
ents
Problem
You want to broadcast datagrams to zero or more hosts identified by a single address.
Solution
Search WWH ::




Custom Search