< prev index next >

test/jdk/com/sun/nio/sctp/SctpMultiChannel/SocketOptionTests.java

Print this page
rev 59383 : [mq]: final

*** 1,7 **** /* ! * Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. --- 1,7 ---- /* ! * Copyright (c) 2009, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 114,128 **** smc.setOption(SO_SNDBUF, 16*1024, null); smc.setOption(SO_RCVBUF, 16*1024, null); checkOption(smc, SO_LINGER, -1); /* default should be negative */ - /* Setting SO_LINGER not support for one-to-many on Solaris */ - if (!"SunOS".equals(osName)) { smc.setOption(SO_LINGER, 2000, null); checkOption(smc, SO_LINGER, 2000); - } /* SCTP_PRIMARY_ADDR */ sctpPrimaryAddr(); /* NullPointerException */ --- 114,125 ----
*** 193,210 **** for (Iterator<SocketAddress> it = remoteAddresses.iterator(); it.hasNext(); ) { InetSocketAddress addr = (InetSocketAddress)it.next(); debug("\t" + addr); } - /* retrieval of SCTP_PRIMARY_ADDR is not supported on Solaris */ - if ("SunOS".equals(osName)) { - /* For now do not set this option. There is a bug on Solaris 10 pre Update 5 - * where setting this option returns Invalid argument */ - //debug("Set SCTP_PRIMARY_ADDR with " + addrToSet); - //smc.setOption(SCTP_PRIMARY_ADDR, addrToSet, assoc); - return; - } else { /* Linux */ SocketAddress primaryAddr = smc.getOption(SCTP_PRIMARY_ADDR, assoc); System.out.println("SCTP_PRIMARY_ADDR returned: " + primaryAddr); /* Verify that this is one of the remote addresses */ check(remoteAddresses.contains(primaryAddr), "SCTP_PRIMARY_ADDR returned bogus address!"); --- 190,199 ----
*** 215,225 **** System.out.println("SCTP_PRIMARY_ADDR set to : " + addrToSet); primaryAddr = smc.getOption(SCTP_PRIMARY_ADDR, assoc); System.out.println("SCTP_PRIMARY_ADDR returned : " + primaryAddr); check(addrToSet.equals(primaryAddr), "SCTP_PRIMARY_ADDR not set correctly"); } - } smc.close(); peerChannel.close(); } class SOTNotificationHandler extends AbstractNotificationHandler<Object> --- 204,213 ----
< prev index next >