< prev index next >

test/java/nio/channels/DatagramChannel/Promiscuous.java

Print this page




  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23 
  24 /* @test
  25  * @bug 8014377
  26  * @summary Test for interference when two sockets are bound to the same
  27  *   port but joined to different multicast groups
  28  * @build Promiscuous  NetworkConfiguration
  29  * @run main Promiscuous
  30  * @run main/othervm -Djava.net.preferIPv4Stack=true Promiscuous

  31  */
  32 
  33 import java.nio.ByteBuffer;
  34 import java.nio.channels.*;
  35 import java.net.*;
  36 import static java.net.StandardProtocolFamily.*;
  37 import java.util.*;
  38 import java.io.IOException;
  39 
  40 public class Promiscuous {
  41 
  42     static final Random rand = new Random();
  43 
  44     static final ProtocolFamily UNSPEC = new ProtocolFamily() {
  45         public String name() {
  46             return "UNSPEC";
  47         }
  48     };
  49 
  50     /**




  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23 
  24 /* @test
  25  * @bug 8014377
  26  * @summary Test for interference when two sockets are bound to the same
  27  *   port but joined to different multicast groups
  28  * @build Promiscuous  NetworkConfiguration
  29  * @run main Promiscuous
  30  * @run main/othervm -Djava.net.preferIPv4Stack=true Promiscuous
  31  * @key randomness
  32  */
  33 
  34 import java.nio.ByteBuffer;
  35 import java.nio.channels.*;
  36 import java.net.*;
  37 import static java.net.StandardProtocolFamily.*;
  38 import java.util.*;
  39 import java.io.IOException;
  40 
  41 public class Promiscuous {
  42 
  43     static final Random rand = new Random();
  44 
  45     static final ProtocolFamily UNSPEC = new ProtocolFamily() {
  46         public String name() {
  47             return "UNSPEC";
  48         }
  49     };
  50 
  51     /**


< prev index next >