Exemple #1
0
        /// <summary>
        /// Starts session.
        /// </summary>
        private void StartSession()
        {
            // Add session to session list
            m_pServer.AddSession(this);

            if (m_pServer.LogCommands)
            {
                m_pLogWriter.AddEntry("//----- Sys: 'Session:'" + this.SessionID + " added " + DateTime.Now);
            }

            // Check if ip is allowed to connect this computer
            if (m_pServer.OnValidate_IpAddress(this.RemoteEndPoint))
            {
                // Notify that server is ready
                if (this.m_pServer.m_WelcomeMsg == "")
                {
                    SendData("220 " + m_pServer.HostName + " FTP server ready\r\n");
                }
                else
                {
                    SendData(this.m_pServer.m_WelcomeMsg);
                }

                BeginRecieveCmd();
            }
            else
            {
                EndSession();
            }
        }
Exemple #2
0
        /// <summary>
        /// Starts session.
        /// </summary>
        private void StartSession()
        {
            // Add session to session list
            m_pServer.AddSession(this);

            // Check if ip is allowed to connect this computer
            if (m_pServer.OnValidate_IpAddress(this.LocalEndPoint, this.RemoteEndPoint))
            {
                // Notify that server is ready
                this.Socket.WriteLine("220 " + this.BindInfo.HostName + " FTP server ready");

                BeginRecieveCmd();
            }
            else
            {
                EndSession();
            }
        }
Exemple #3
0
        /// <summary>
        /// Starts session.
        /// </summary>
        private void StartSession()
        {
            // Add session to session list
            m_pServer.AddSession(this);

            //	if(m_pServer.LogCommands){
            //		m_pLogWriter.AddEntry("//----- Sys: 'Session:'" + this.SessionID + " added " + DateTime.Now);
            //	}

            // Check if ip is allowed to connect this computer
            if (m_pServer.OnValidate_IpAddress(this.RemoteEndPoint))
            {
                // Notify that server is ready
                m_pSocket.SendLine("220 " + m_pServer.HostName + " FTP server ready");

                BeginRecieveCmd();
            }
            else
            {
                EndSession();
            }
        }