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; }
public FTPResponse GetResponse() { FTPResponse lastResponse = this.controlChannelReceiver.Response; this.controlChannelReceiver.Clear(); return(lastResponse); }
protected virtual void OnCommandCompleted(string Command, FTPResponse Response) { EventHandler <CommandCompletedEventArgs> handler = this.CommandCompleted; if (handler != null) { handler(this, new CommandCompletedEventArgs(Command, Response)); } }
internal CommandCompletedEventArgs(string Command, FTPResponse Response) { this.Command = Command; this.Response = Response; this.ReceivedAt = DateTime.Now; }
public void Clear() { this.p_Message = System.String.Empty; this.p_StatusCode = -1; this.p_FTPResponse = new FTPResponse(); }