Examples of shutdownOutput()


Examples of ch.unifr.nio.framework.mockups.TestTarget.shutdownOutput()

        blockingChannel.configureBlocking(false);
        TestChannelHandler testChannelHandler = new TestChannelHandler();
        steppingDispatcher.registerChannel(blockingChannel, testChannelHandler);

        logger.finest("close input from target");
        testTarget.shutdownOutput();

        logger.finest("wait until shutdown propagated through framework");
        testChannelHandler.waitForInputClosed();

        logger.finest(
View Full Code Here

Examples of etch.util.core.nio.Tcp2Connection.shutdownOutput()

      assertNotNull( dh.xbuf );
      assertEquals( 1, dh.xbuf.length );
      assertEquals( (byte) i, dh.xbuf[0] );

//      Log.report( "c.shutingDownOutput" );
      c.shutdownOutput();
//      Log.report( "c.shutdownOutput" );
     
//      Log.report( "t.reading" );
      assertEquals( -1, read( t ) );
//      Log.report( "t.eof" );
View Full Code Here

Examples of io.netty.channel.socket.SocketChannel.shutdownOutput()

            assertTrue(h.ch.isActive());
            assertFalse(h.ch.isInputShutdown());
            assertFalse(h.ch.isOutputShutdown());

            // Make the connection half-closed and ensure read() returns -1.
            ch.shutdownOutput().sync();
            assertEquals(-1, s.getInputStream().read());

            assertTrue(h.ch.isOpen());
            assertTrue(h.ch.isActive());
            assertFalse(h.ch.isInputShutdown());
View Full Code Here

Examples of java.net.Socket.shutdownOutput()

        try{
            Socket s = new Socket(InetAddress.getLocalHost(), _port);
            OutputStream out = s.getOutputStream();
            out.write((_key+"\r\nstop\r\n").getBytes());
            out.flush();
            s.shutdownOutput();
            s.close();
        }catch (Exception e){
            e.printStackTrace();
        }
    }
View Full Code Here

Examples of java.net.Socket.shutdownOutput()

            try (Socket sock = new Socket(host, port)) {
                OutputStream outstream = sock.getOutputStream();
                outstream.write(cmd.getBytes());
                outstream.flush();
                // this replicates NC - close the output stream before reading
                sock.shutdownOutput();

                try (BufferedReader reader = new BufferedReader(
                        new InputStreamReader(sock.getInputStream()))) {
                    StringBuilder sb = new StringBuilder();
                    String line;
View Full Code Here

Examples of java.net.Socket.shutdownOutput()

        {
          log.fine("shutting down");
          state = Connection.CLOSING;
          Socket sock = sc.socket();
          try {
            sock.shutdownOutput();
          } catch (IOException se) {
            log.severe("shutdown failed: " + se.getMessage());
            log.log(Level.FINE, "details: ", se);
          }
        } else
View Full Code Here

Examples of java.net.Socket.shutdownOutput()

  }

        // Close the streams and the socket.
        try {
      objectOut.flush();
      socket.shutdownOutput();
            objectOut.close();
            out.close();
      objectIn.close();
            socket.close();
        } catch (IOException e) {
View Full Code Here

Examples of java.net.Socket.shutdownOutput()

            }

      // Close the various streams and the socket.
            try {
    objectOut.flush();
    socket.shutdownOutput();
    socket.shutdownInput();
                objectOut.close();
                out.close();
                objectIn.close();
                in.close();
View Full Code Here

Examples of java.net.Socket.shutdownOutput()

                // then this inner class should be renamed "DataServer".

                // Close the various streams and the socket itself.
                try {
        objectOut.flush();
        socket.shutdownOutput();
        socket.shutdownInput();
                    objectOut.close();
                    objectIn.close();
                    out.close();
                    in.close();
View Full Code Here

Examples of java.net.Socket.shutdownOutput()

      assertNull( dh.xsender );
      assertNotNull( dh.xbuf );
      assertEquals( 1, dh.xbuf.length );
      assertEquals( (byte) i, dh.xbuf[0] );

      t.shutdownOutput();
      t.close();
      t = null;
     
      assertWhat( What.DOWN, dh.what );
    }
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.