Exemple #1
0
 protected virtual void HandleAllowedFastMessage(PeerId id, AllowedFastMessage message)
 {
     if (!Manager.Bitfield[message.PieceIndex])
     {
         id.IsAllowedFastPieces.Add(message.PieceIndex);
     }
 }
Exemple #2
0
 void peer_AllowedFastMessageReceived(object sender, AllowedFastMessage e)
 {
     ShowMessage("{0}:Received {1}", sender, e);
 }
Exemple #3
0
 protected override void HandleAllowedFastMessage(PeerId id, AllowedFastMessage message)
 {
     // Disregard these when in metadata mode as we can't request regular pieces anyway
 }
 protected override void HandleAllowedFastMessage(PeerId id, AllowedFastMessage message)
 {
     // Disregard these when in metadata mode as we can't request regular pieces anyway
 }
Exemple #5
0
 protected virtual void HandleAllowedFastMessage(PeerId id, AllowedFastMessage message)
 {
     if (!Manager.Bitfield[message.PieceIndex])
         id.IsAllowedFastPieces.Add(message.PieceIndex);
 }
Exemple #6
0
        /// <summary>
        /// Send allowed fast message asynchronously
        /// </summary>
        /// <param name="index">the index of piece</param>
        public void SendAllowedFastMessageAsync(int index)
        {
            AllowedFastMessage message = new AllowedFastMessage(index);

            SendMessageAsync(message);
        }