All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.frostwire.jlibtorrent.alerts.PeerErrorAlert Maven / Gradle / Ivy

There is a newer version: 1.2.0.18
Show newest version
package com.frostwire.jlibtorrent.alerts;

import com.frostwire.jlibtorrent.ErrorCode;
import com.frostwire.jlibtorrent.swig.peer_error_alert;

/**
 * This alert is generated when a peer sends invalid data over the peer-peer protocol. The peer
 * will be disconnected, but you get its ip address from the alert, to identify it.
 *
 * @author gubatron
 * @author aldenml
 */
public final class PeerErrorAlert extends PeerAlert {

    public PeerErrorAlert(peer_error_alert alert) {
        super(alert);
    }

    /**
     * @return
     */
    public int operation() {
        return alert.getOperation();
    }

    /**
     * Tells you what error caused this alert.
     *
     * @return
     */
    public ErrorCode error() {
        return new ErrorCode(alert.getError());
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy