Details

    • Workaround Description:
      Hide

      The solution is rather simple, at subclass Reciever add:

      run {
      ...
      if(jg) {
      obj=channel.receive(0);
      if(obj instanceof Message)

      { byte[] buffer = ((Message)obj).getBuffer(); in=new DataInputStream(new ByteArrayInputStream(buffer)); }

      else

      { System.out.println("received non-msg: " + obj.getClass()); continue; }

      }
      else

      { sock.receive(packet); in=new DataInputStream(new ByteArrayInputStream(buf)); }

      number=in.readInt();
      matrix[number][1]=1;

      if (num_received != number)

      { System.err.println(" lost packet "+ number); num_received = number; }

      ...
      num_received++;

      Show
      The solution is rather simple, at subclass Reciever add: run { ... if(jg) { obj=channel.receive(0); if(obj instanceof Message) { byte[] buffer = ((Message)obj).getBuffer(); in=new DataInputStream(new ByteArrayInputStream(buffer)); } else { System.out.println("received non-msg: " + obj.getClass()); continue; } } else { sock.receive(packet); in=new DataInputStream(new ByteArrayInputStream(buf)); } number=in.readInt(); matrix [number] [1] =1; if (num_received != number) { System.err.println(" lost packet "+ number); num_received = number; } ... num_received++;
    • Estimated Difficulty:
      Low

      Description

      See at org.jgroups.tests.SpeedTest:

      If pakets get lost - without using JGroups but pure sockets - the SpeedTest never ends.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                belaban Bela Ban
                Reporter:
                DLade Danny Lade
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 5 minutes
                  5m
                  Remaining:
                  Remaining Estimate - 5 minutes
                  5m
                  Logged:
                  Time Spent - Not Specified
                  Not Specified