Examples of shutdownOutput()


Examples of java.net.Socket.shutdownOutput()

                    key.selected(OP_READ);
                }
            }
            if (how == ShutdownType.WRITE || how == ShutdownType.BOTH) {
                if (!socket.isOutputShutdown()) {
                    socket.shutdownOutput();
                    key.selected(OP_WRITE);
                }
            }
        } catch (SocketException e) {
            if (!socket.isConnected()) {
View Full Code Here

Examples of java.net.Socket.shutdownOutput()

                socket.shutdownInput();
            } catch (Exception e) {
                ;
            }
            try {
                socket.shutdownOutput();
            } catch (Exception e) {
                ;
            }
            try {
                socket.close();
View Full Code Here

Examples of java.net.Socket.shutdownOutput()

        while ((b=fis.read()) != -1){
            os.write(b);
        }
        sendLine("bsh.prompt=\"bsh % \";",os);// Reset for other users
        os.flush();
        sock.shutdownOutput(); // Tell server that we are done
    }

    private static void sendLine( String line, OutputStream outPipe )
    throws IOException
    {
View Full Code Here

Examples of java.nio.channels.SocketChannel.shutdownOutput()

        ByteBuffer buffer = generator.control(new GoAwayFrame(version, streamId, SessionStatus.OK.getCode()));
        channel.write(buffer);
        Assert.assertThat(buffer.hasRemaining(), is(false));

        assertThat("GoAway frame is received by server", goAwayReceivedLatch.await(5, TimeUnit.SECONDS), is(true));
        channel.shutdownOutput();
        channel.close();
    }

    @Test
    public void testOddEvenStreamIds() throws Exception
View Full Code Here

Examples of javax.net.ssl.SSLSocket.shutdownOutput()

        SSLSocket socket = null;
        try {
            server = new Server();
            socket = createSSLSocket(server.getPort());

            socket.shutdownOutput();
            fail("Expected exception was not thrown");
        } catch (Exception e) {
            if (doLog) {
                System.out.println("Trowed exception: "+e.getMessage());
            }
View Full Code Here

Examples of org.eclipse.jetty.io.ByteArrayEndPoint.shutdownOutput()

    @Test
    public void test_Send_NoRequestContent_Exception() throws Exception
    {
        ByteArrayEndPoint endPoint = new ByteArrayEndPoint();
        // Shutdown output to trigger the exception on write
        endPoint.shutdownOutput();
        HttpDestinationOverHTTP destination = new HttpDestinationOverHTTP(client, new Origin("http", "localhost", 8080));
        HttpConnectionOverHTTP connection = new HttpConnectionOverHTTP(endPoint, destination);
        Request request = client.newRequest(URI.create("http://localhost/"));
        final CountDownLatch failureLatch = new CountDownLatch(2);
        request.listener(new Request.Listener.Adapter()
View Full Code Here

Examples of org.eclipse.jetty.io.EndPoint.shutdownOutput()

        EndPoint endPoint = getEndPoint();
        // We need to gently close first, to allow
        // SSL close alerts to be sent by Jetty
        if (LOG.isDebugEnabled())
            LOG.debug("Shutting down output {}",endPoint);
        endPoint.shutdownOutput();
        if (!onlyOutput)
        {
            if (LOG.isDebugEnabled())
                LOG.debug("Closing {}",endPoint);
            endPoint.close();
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.