public FtpServer(Configuration.FtpServerOptionElement configuration) : base(21) { //不要在构造函数检测参数是否空,应该在OnStart方法中检测 _configuration = configuration; _pasvDataChannelPool = new ObjectPool <FtpPasvDataChannel>( () => { var channel = new FtpPasvDataChannel(); channel.StartListener(); return(channel); }, channel => channel.StopListener()); _commandExecutor = new FtpCommandExecutor(); }
public FtpServer(Configuration.FtpServerOptionElement configuration) : base(21) { //不要在构造函数检测参数是否空,应该在OnStart方法中检测 _configuration = configuration; _pasvDataChannelPool = new ObjectPool<FtpPasvDataChannel>( () => { var channel = new FtpPasvDataChannel(); channel.StartListener(); return channel; }, channel => channel.StopListener()); _commandExecutor = new FtpCommandExecutor(); }