public override bool Equals(object obj)
        {
            RejectRequestMessage msg = obj as RejectRequestMessage;

            if (msg == null)
            {
                return(false);
            }

            return(this.pieceIndex == msg.pieceIndex &&
                   this.startOffset == msg.startOffset &&
                   this.requestLength == msg.requestLength);
        }
Exemple #2
0
        public override bool Equals(object obj)
        {
            RejectRequestMessage msg = obj as RejectRequestMessage;

            if (msg == null)
            {
                return(false);
            }

            return(PieceIndex == msg.PieceIndex &&
                   StartOffset == msg.StartOffset &&
                   RequestLength == msg.RequestLength);
        }
Exemple #3
0
 protected virtual void HandleRejectRequestMessage(PeerId id, RejectRequestMessage message)
 {
     id.TorrentManager.PieceManager.Picker.CancelRequest(id, message.PieceIndex, message.StartOffset, message.RequestLength);
 }