com.acgist.snail.net.torrent.peer.PeerServer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of snail Show documentation
Show all versions of snail Show documentation
基于Java开发的下载工具,支持下载协议:BT(BitTorrent、磁力链接、种子文件)、HLS(M3U8)、FTP、HTTP。
package com.acgist.snail.net.torrent.peer;
import com.acgist.snail.net.TcpServer;
import com.acgist.snail.system.config.SystemConfig;
/**
* Peer服务端
*
* @author acgist
* @since 1.0.0
*/
public class PeerServer extends TcpServer {
// private static final Logger LOGGER = LoggerFactory.getLogger(PeerServer.class);
private PeerServer() {
super("Peer Server", PeerMessageHandler.class);
}
private static final PeerServer INSTANCE = new PeerServer();
public static final PeerServer getInstance() {
return INSTANCE;
}
@Override
public boolean listen() {
return this.listen(SystemConfig.getTorrentPort());
}
}