equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2006, 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. |
76 ExecutorService executor = Executors.newCachedThreadPool(); |
76 ExecutorService executor = Executors.newCachedThreadPool(); |
77 server.setExecutor (executor); |
77 server.setExecutor (executor); |
78 server.start (); |
78 server.start (); |
79 |
79 |
80 InetSocketAddress destaddr = new InetSocketAddress ( |
80 InetSocketAddress destaddr = new InetSocketAddress ( |
81 "127.0.0.1", server.getAddress().getPort() |
81 InetAddress.getLoopbackAddress(), server.getAddress().getPort() |
82 ); |
82 ); |
83 System.out.println ("destaddr " + destaddr); |
83 System.out.println ("destaddr " + destaddr); |
84 |
84 |
85 Selector selector = Selector.open (); |
85 Selector selector = Selector.open (); |
86 int requests = 0; |
86 int requests = 0; |