equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2001, 2019, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
55 } |
55 } |
56 |
56 |
57 public static void main(String[] args) throws Exception { |
57 public static void main(String[] args) throws Exception { |
58 IPSupport.throwSkippedExceptionIfNonOperational(); |
58 IPSupport.throwSkippedExceptionIfNonOperational(); |
59 |
59 |
60 ServerSocket ss = new ServerSocket(0); |
60 ServerSocket ss = new ServerSocket(0, 0, InetAddress.getLocalHost()); |
61 Socket client = new Socket(InetAddress.getLocalHost(), |
61 Socket client = new Socket(InetAddress.getLocalHost(), |
62 ss.getLocalPort()); |
62 ss.getLocalPort()); |
63 Socket server = ss.accept(); |
63 Socket server = ss.accept(); |
64 ss.close(); |
64 ss.close(); |
65 new Thread(new Closer(server)).start(); |
65 new Thread(new Closer(server)).start(); |