org.libtorrent4j.alerts.BlockUploadedAlert Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of libtorrent4j Show documentation
Show all versions of libtorrent4j Show documentation
A swig Java interface for libtorrent
package org.libtorrent4j.alerts;
import org.libtorrent4j.swig.block_uploaded_alert;
/**
* This alert is posted when a block intended to be sent to a peer is placed in the
* send buffer. Note that if the connection is closed before the send buffer is sent,
* the alert may be posted without the bytes having been sent to the peer.
* It belongs to the ``progress_notification`` category.
*
* @author gubatron
* @author aldenml
*/
public final class BlockUploadedAlert extends PeerAlert {
BlockUploadedAlert(block_uploaded_alert alert) {
super(alert);
}
/**
* @return the block index
*/
public int blockIndex() {
return alert.getBlock_index();
}
/**
* @return the piece index
*/
public int pieceIndex() {
return alert.getPiece_index();
}
}