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

com.acgist.snail.net.torrent.peer.PeerServer Maven / Gradle / Ivy

Go to download

基于Java开发的下载工具,支持下载协议:BT(BitTorrent、磁力链接、种子文件)、HLS(M3U8)、FTP、HTTP。

There is a newer version: 2.17.0
Show newest version
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());
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy