Changeset 1460bec for router


Ignore:
Timestamp:
Jul 6, 2018 1:27:38 PM (2 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
a916c1a2
Parents:
7aca1e40
Message:

SSU: Change remaining acks from List to Set (ticket #2258)

Location:
router/java/src/net/i2p/router/transport/udp
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • router/java/src/net/i2p/router/transport/udp/OutboundMessageFragments.java

    r7aca1e40 r1460bec  
    55import java.util.Collections;
    66import java.util.Comparator;
     7import java.util.HashSet;
    78import java.util.Iterator;
    89import java.util.List;
     
    387388        // getCurrentFullACKs() already makes a copy, do we need to copy again?
    388389        // YES because buildPacket() now removes them (maybe)
    389         List<Long> remaining = new ArrayList<Long>(msgIds);
     390        Set<Long> remaining = new HashSet<Long>(msgIds);
    390391
    391392        // build the list of fragments to send
  • router/java/src/net/i2p/router/transport/udp/PacketBuilder.java

    r7aca1e40 r1460bec  
    66import java.util.ArrayList;
    77import java.util.Arrays;
     8import java.util.Collection;
    89import java.util.Collections;
    910import java.util.Iterator;
     
    291292     */
    292293    public UDPPacket buildPacket(OutboundMessageState state, int fragment, PeerState peer,
    293                                  List<Long> ackIdsRemaining, int newAckCount,
     294                                 Collection<Long> ackIdsRemaining, int newAckCount,
    294295                                 List<ACKBitfield> partialACKsRemaining) {
    295296        List<Fragment> frags = Collections.singletonList(new Fragment(state, fragment));
     
    303304     */
    304305    public UDPPacket buildPacket(List<Fragment> fragments, PeerState peer,
    305                                  List<Long> ackIdsRemaining, int newAckCount,
     306                                 Collection<Long> ackIdsRemaining, int newAckCount,
    306307                                 List<ACKBitfield> partialACKsRemaining) {
    307308        StringBuilder msg = null;
Note: See TracChangeset for help on using the changeset viewer.