/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/* @test
* @summary Test socket adapter sendUrgentData method
* @bug 6963907
*/
public class OutOfBand {
try {
// establish loopback connection
// enable SO_OOBLINE on server side
// run tests
} finally {
}
}
/**
*/
throws Exception
{
for (int i=0; i<1000; i++) {
throw new RuntimeException("One byte expected");
throw new RuntimeException("Unexpected byte");
}
}
/**
* OOB mark changing.
*/
throws Exception
{
public void run() {
try {
for (int i=0; i<256; i++)
} catch (IOException ioe) {
}
}
};
while (bb.hasRemaining()) {
throw new RuntimeException("Unexpected EOF");
}
byte expect = 0;
while (bb.hasRemaining()) {
throw new RuntimeException("Unexpected byte");
expect++;
}
}
/**
* Test that is close to some real world examples where an urgent byte is
* used to "cancel" a long running query or transaction on the server.
*/
throws Exception
{
public void run() {
try {
if (n != 1) {
"One byte expected";
throw new RuntimeException(msg);
}
throw new RuntimeException("Unexpected byte");
} catch (IOException ioe) {
}
}
};
// "stop" server
// wait for server reply
if (n != 1)
throw new RuntimeException("Unexpected number of bytes");
throw new RuntimeException("Unexpected reply");
}
sc.configureBlocking(false);
try {
throw new RuntimeException("IllegalBlockingModeException expected");
} catch (IllegalBlockingModeException x) {
// expected
} finally {
}
}
}