Package com.barchart.udt

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


          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

        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

        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

    double maxMbs = -1;

    while ((System.currentTimeMillis() - start) < 15000) {

      clientSocket.send(data);
      acceptSocket.receive(data);

      if (System.currentTimeMillis() - interval > 1000) {

        interval = System.currentTimeMillis();
View Full Code Here

    double maxMbs = -1;

    while ((System.currentTimeMillis() - start) < 15000) {

      clientSocket.send(data);
      acceptSocket.receive(data);

      if (System.currentTimeMillis() - interval > 1000) {

        interval = System.currentTimeMillis();
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.