Package com.barchart.udt

Examples of com.barchart.udt.SocketUDT.receive()


      try {
        if (isBlocking) {
          begin(); // JDK contract for NIO blocking calls
        }
        if (buffer.isDirect()) {
          sizeReceived = socket.receive(buffer);
        } else {
          assert buffer.hasArray();
          byte[] array = buffer.array();
          int position = buffer.position();
          int limit = buffer.limit();
View Full Code Here


        } else {
          assert buffer.hasArray();
          byte[] array = buffer.array();
          int position = buffer.position();
          int limit = buffer.limit();
          sizeReceived = socket.receive(array, position, limit);
          if (0 < sizeReceived && sizeReceived <= remaining) {
            buffer.position(position + sizeReceived);
          }
        }
      } finally {
View Full Code Here

      try {
        if (isBlocking) {
          begin(); // JDK contract for NIO blocking calls
        }
        if (buffer.isDirect()) {
          sizeReceived = socket.receive(buffer);
        } else {
          assert buffer.hasArray();
          byte[] array = buffer.array();
          int position = buffer.position();
          int limit = buffer.limit();
View Full Code Here

        } else {
          assert buffer.hasArray();
          byte[] array = buffer.array();
          int position = buffer.position();
          int limit = buffer.limit();
          sizeReceived = socket.receive(array, position, limit);
          if (0 < sizeReceived && sizeReceived <= remaining) {
            buffer.position(position + sizeReceived);
          }
        }
      } finally {
View Full Code Here

      try {
        if (isBlocking) {
          begin(); // JDK contract for NIO blocking calls
        }
        if (buffer.isDirect()) {
          sizeReceived = socket.receive(buffer);
        } else {
          assert buffer.hasArray();
          byte[] array = buffer.array();
          int position = buffer.position();
          int limit = buffer.limit();
View Full Code Here

        } else {
          assert buffer.hasArray();
          byte[] array = buffer.array();
          int position = buffer.position();
          int limit = buffer.limit();
          sizeReceived = socket.receive(array, position, limit);
          if (0 < sizeReceived && sizeReceived <= remaining) {
            buffer.position(position + sizeReceived);
          }
        }
      } finally {
View Full Code Here

        begin(); // JDK contract for NIO blocking calls
      }

      if (buffer.isDirect()) {

        sizeReceived = socket.receive(buffer);

      } else {

        final byte[] array = buffer.array();
        final int position = buffer.position();
View Full Code Here

        final byte[] array = buffer.array();
        final int position = buffer.position();
        final int limit = buffer.limit();

        sizeReceived = socket.receive(array, position, limit);

        if (0 < sizeReceived && sizeReceived <= remaining) {
          buffer.position(position + sizeReceived);
        }
View Full Code Here

        buffer.rewind();

        final TimerContext timer = recvTime.time();

        final int count = server.receive(buffer);

        timer.stop();

        if (count != size) {
          throw new Exception("count");
View Full Code Here

      while (true) {

        final byte[] array = new byte[SIZE];

        final int result = receiver.receive(array);

        assert result == SIZE : "wrong size";

        getSequenceNumber(array);
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.