Пример #1
0
 private void AddCommandList(FTPCommand Command)
 {
     if (m_NextCommand == null)
     {
         m_NextCommand = Command;
     }
     m_cmdList.Add(Command);
 }
Пример #2
0
		private void ProceedCommand(FTPCommand Command)
		{
			m_CurrentCommand = Command;
			if (m_cmdList.Count > 0) 
				m_NextCommand = (FTPCommand) m_cmdList[0];
			else
				m_NextCommand = null;
			CommandNotify(Command.GetCommandLine());
			m_cmdSock.Send(Command.GetCommandLine());
		}
Пример #3
0
 public void ProceedNextCommand()
 {
     if (m_cmdList.Count > 0)
     {
         FTPCommand cmd = (FTPCommand)m_cmdList[0];
         m_cmdList.RemoveAt(0);
         ProceedCommand(cmd);
     }
     else
     {
         m_CurrentCommand = null;
     }
 }
Пример #4
0
 private void ProceedCommand(FTPCommand Command)
 {
     m_CurrentCommand = Command;
     if (m_cmdList.Count > 0)
     {
         m_NextCommand = (FTPCommand)m_cmdList[0];
     }
     else
     {
         m_NextCommand = null;
     }
     CommandNotify(Command.GetCommandLine());
     m_cmdSock.Send(Command.GetCommandLine());
 }
Пример #5
0
		public void SendCommand(FTPCommand Command)
		{
			if (m_CurrentCommand != null || m_bConnected == false)
			{
				if (Command.Command == "RETR" || Command.Command == "STOR" || Command.Command == "LIST")
				{
					AddCommandList ( new FTPCommand("PASV", 227));
				}
				AddCommandList (Command);
			}
			else
			{	
				if (Command.Command == "RETR" || Command.Command == "STOR" || Command.Command == "LIST")
				{
					AddCommandList (Command);
					ProceedCommand ( new FTPCommand("PASV", 227));
				}
				else
					ProceedCommand(Command);
			}
		}
Пример #6
0
 public void SendCommand(FTPCommand Command)
 {
     if (m_CurrentCommand != null || m_bConnected == false)
     {
         if (Command.Command == "RETR" || Command.Command == "STOR" || Command.Command == "LIST")
         {
             AddCommandList(new FTPCommand("PASV", 227));
         }
         AddCommandList(Command);
     }
     else
     {
         if (Command.Command == "RETR" || Command.Command == "STOR" || Command.Command == "LIST")
         {
             AddCommandList(Command);
             ProceedCommand(new FTPCommand("PASV", 227));
         }
         else
         {
             ProceedCommand(Command);
         }
     }
 }
Пример #7
0
 private void CancelCommand()
 {
     m_cmdList.Clear();
     m_CurrentCommand = null;
 }
Пример #8
0
 private void AddCommandList(FTPCommand Command)
 {
     if (m_NextCommand == null)
         m_NextCommand = Command;
     m_cmdList.Add (Command);
 }
Пример #9
0
 public void ProceedNextCommand()
 {
     if (m_cmdList.Count > 0)
     {
         FTPCommand cmd = (FTPCommand) m_cmdList[0];
         m_cmdList.RemoveAt(0);
         ProceedCommand(cmd);
     }
     else
         m_CurrentCommand = null;
 }
Пример #10
0
 private void CancelCommand()
 {
     m_cmdList.Clear();
     m_CurrentCommand = null;
 }