com.frostwire.jlibtorrent.SwigPlugin Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jlibtorrent Show documentation
Show all versions of jlibtorrent Show documentation
A swig Java interface for libtorrent by the makers of FrostWire.
package com.frostwire.jlibtorrent;
import com.frostwire.jlibtorrent.swig.*;
/**
* @author gubatron
* @author aldenml
*/
class SwigPlugin extends swig_plugin {
private final Plugin p;
public SwigPlugin(Plugin p) {
this.p = p;
}
@Override
public boolean on_dht_request(string_view query, udp_endpoint source,
bdecode_node message, entry response) {
byte_vector v = query.to_bytes();
String s = Vectors.byte_vector2string(v, "US-ASCII");
return p.onDhtRequest(s, new UdpEndpoint(source),
new BDecodeNode(message), new Entry(response));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy