Exemplo n.º 1
0
        /// <summary>
        /// Default constructor.
        /// </summary>
        /// <param name="clientSocket">Referance to socket.</param>
        /// <param name="server">Referance to FTP server.</param>
        /// <param name="sessionID">Session ID which is assigned to this session.</param>
        /// <param name="logWriter">Log writer.</param>
        public FTP_Session(Socket clientSocket, FTP_Server server, string sessionID, _LogWriter logWriter)
        {
            m_pSocket          = new BufferedSocket(clientSocket);
            m_pServer          = server;
            m_SessionID        = sessionID;
            m_pLogWriter       = logWriter;
            m_SessionStartTime = DateTime.Now;
            m_LastDataTime     = DateTime.Now;

            m_pSocket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.NoDelay, 1);

            // Start session proccessing
            StartSession();
        }
Exemplo n.º 2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="socket"></param>
 protected override void InitNewSession(Socket socket)
 {
     _LogWriter   logWriter = new _LogWriter(this.SessionLog);
     POP3_Session session   = new POP3_Session(socket, this, logWriter);
 }
Exemplo n.º 3
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="socket"></param>
 protected override void InitNewSession(Socket socket)
 {
     _LogWriter  logWriter = new _LogWriter(this.SessionLog);
     FTP_Session session   = new FTP_Session(socket, this, Guid.NewGuid().ToString(), logWriter);
 }