Exemple #1
0
 public FTPControlChannelReceiver()
 {
     this.p_MatchResponse = new System.Text.RegularExpressions.Regex(@"^(?<code>\d{3})(?<delimiter>[ \t-])(?<message>.*)$", System.Text.RegularExpressions.RegexOptions.Compiled);
     this.p_FTPResponse   = new FTPResponse();
     this.p_StatusCode    = -1;
     this.p_Message       = System.String.Empty;
 }
Exemple #2
0
        public FTPResponse GetResponse()
        {
            FTPResponse lastResponse = this.controlChannelReceiver.Response;

            this.controlChannelReceiver.Clear();

            return(lastResponse);
        }
Exemple #3
0
        protected virtual void OnCommandCompleted(string Command, FTPResponse Response)
        {
            EventHandler <CommandCompletedEventArgs> handler = this.CommandCompleted;

            if (handler != null)
            {
                handler(this, new CommandCompletedEventArgs(Command, Response));
            }
        }
Exemple #4
0
 internal CommandCompletedEventArgs(string Command, FTPResponse Response)
 {
     this.Command    = Command;
     this.Response   = Response;
     this.ReceivedAt = DateTime.Now;
 }
Exemple #5
0
 public void Clear()
 {
     this.p_Message     = System.String.Empty;
     this.p_StatusCode  = -1;
     this.p_FTPResponse = new FTPResponse();
 }