public TFtpTransfer(ITransferChannel connection, string filename, ITransferState initialState) { ProposedOptions = TransferOptionSet.NewDefaultSet(); Filename = filename; RetryCount = 5; SetState(initialState); Connection = connection; Connection.OnCommandReceived += Connection_OnCommandReceived; Connection.OnError += Connection_OnError; Connection.Open(); Timer = new Timer(Timer_OnTimer, null, 500, 500); }
internal void FinishOptionNegotiation(TransferOptionSet negotiated) { NegotiatedOptions = negotiated; if (!NegotiatedOptions.IncludesBlockSizeOption) { NegotiatedOptions.BlockSize = TransferOptionSet.DefaultBlocksize; } if (!NegotiatedOptions.IncludesTimeoutOption) { NegotiatedOptions.Timeout = TransferOptionSet.DefaultTimeoutSecs; } }