Skip to content

Commit

Permalink
添加保留字节和支持消息类型交换
Browse files Browse the repository at this point in the history
  • Loading branch information
Ghost-chu committed Oct 18, 2024
1 parent 4d45b6b commit 69edf66
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import com.biglybt.pif.ipfilter.IPBanned;
import com.biglybt.pif.ipfilter.IPFilter;
import com.biglybt.pif.ipfilter.IPFilterException;
import com.biglybt.pif.messaging.Message;
import com.biglybt.pif.peers.*;
import com.biglybt.pif.tag.Tag;
import com.biglybt.pif.torrent.Torrent;
Expand Down Expand Up @@ -534,7 +535,9 @@ private PeerRecord getPeerRecord(Peer peer) {
client,
peer.isOptimisticUnchoke(),
peer.supportsMessaging(),
peer.isPriorityConnection()
peer.isPriorityConnection(),
peer.getHandshakeReservedBytes(),
Arrays.stream(peer.getSupportedMessages()).map(Message::getID).collect(Collectors.toList())
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import lombok.NoArgsConstructor;

import java.util.List;

/*
com.biglybt.pif.peers.Peer.java
*/
Expand Down Expand Up @@ -37,4 +38,6 @@ public class PeerRecord {
private boolean optimisticUnchoke;
private boolean supportsMessaging;
private boolean priorityConnection;
private byte[] handshakeReservedBytes;
private List<String> peerSupportedMessages;
}

0 comments on commit 69edf66

Please sign in to comment.