Package java.net

Examples of java.net.Socket.shutdownInput()


                try {
                    sock.shutdownOutput();
                } catch (IOException ignore) {
                }
                try {
                    sock.shutdownInput();
                } catch (IOException ignore) {
                }
            } catch (UnsupportedOperationException ignore) {
                // if one isn't supported, the other one isn't either
            }
View Full Code Here


                try {
                    sock.shutdownOutput();
                } catch (IOException ignore) {
                }
                try {
                    sock.shutdownInput();
                } catch (IOException ignore) {
                }
            } catch (UnsupportedOperationException ignore) {
                // if one isn't supported, the other one isn't either
            }
View Full Code Here

        client.close();
        server.close();

        // Regression test for HARMONY-2944
        Socket s = new Socket("0.0.0.0", 0, false);
        s.shutdownInput();
        try {
            s.shutdownInput();
            fail("should throw SocketException");
        } catch (SocketException se) {
            // Expected
View Full Code Here

        // Regression test for HARMONY-2944
        Socket s = new Socket("0.0.0.0", 0, false);
        s.shutdownInput();
        try {
            s.shutdownInput();
            fail("should throw SocketException");
        } catch (SocketException se) {
            // Expected
        }
        s.close();
View Full Code Here

    {
        final Socket socket = channel.socket();
        try {
            if (how == ShutdownType.READ  || how == ShutdownType.BOTH) {
                if (!socket.isInputShutdown()) {
                    socket.shutdownInput();
                    key.selected(OP_READ);
                }
            }
            if (how == ShutdownType.WRITE || how == ShutdownType.BOTH) {
                if (!socket.isOutputShutdown()) {
View Full Code Here

            return;
        }
        if (handler.getUnderlyingChannel() != null) {
            socket = ((SocketChannel) handler.getUnderlyingChannel()).socket();
            try {
                socket.shutdownInput();
            } catch (Exception e) {
                ;
            }
            try {
                socket.shutdownOutput();
View Full Code Here

                try {
                    sock.shutdownOutput();
                } catch (IOException ignore) {
                }
                try {
                    sock.shutdownInput();
                } catch (IOException ignore) {
                }
            } catch (UnsupportedOperationException ignore) {
                // if one isn't supported, the other one isn't either
            }
View Full Code Here

                try {
                    sock.shutdownOutput();
                } catch (IOException ignore) {
                }
                try {
                    sock.shutdownInput();
                } catch (IOException ignore) {
                }
            } catch (UnsupportedOperationException ignore) {
                // if one isn't supported, the other one isn't either
            }
View Full Code Here

            }
        }

        println("shutting down socket...");
        s.shutdownOutput();
        s.shutdownInput();
        s.close();

        println("done test1...");
    }
View Full Code Here

     * @tests Socket#shutdownOutput()
     */
    public void test_shutdownInputOutput_twice() throws Exception {
        // regression test for Harmony-2944
        Socket s = new Socket("0.0.0.0", 0, false);
        s.shutdownInput();

        try {
            s.shutdownInput();
            fail("should throw SocketException");
        } catch (SocketException se) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.