protected virtual void HandleAllowedFastMessage(PeerId id, AllowedFastMessage message) { if (!Manager.Bitfield[message.PieceIndex]) { id.IsAllowedFastPieces.Add(message.PieceIndex); } }
void peer_AllowedFastMessageReceived(object sender, AllowedFastMessage e) { ShowMessage("{0}:Received {1}", sender, e); }
protected override void HandleAllowedFastMessage(PeerId id, AllowedFastMessage message) { // Disregard these when in metadata mode as we can't request regular pieces anyway }
protected virtual void HandleAllowedFastMessage(PeerId id, AllowedFastMessage message) { if (!Manager.Bitfield[message.PieceIndex]) id.IsAllowedFastPieces.Add(message.PieceIndex); }
/// <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); }