com.acgist.snail.net.torrent.tracker.TrackerClient Maven / Gradle / Ivy
package com.acgist.snail.net.torrent.tracker;
import java.net.InetSocketAddress;
import com.acgist.snail.net.UdpClient;
/**
* Tracker Client
*
* @author acgist
* @since 1.0.0
*/
public class TrackerClient extends UdpClient {
private TrackerClient(InetSocketAddress socketAddress) {
super("Tracker Client", new TrackerMessageHandler(), socketAddress);
}
public static final TrackerClient newInstance(InetSocketAddress socketAddress) {
return new TrackerClient(socketAddress);
}
@Override
public boolean open() {
return this.open(TrackerServer.getInstance().channel());
}
}