/// <summary> /// Default constructor. /// </summary> /// <param name="sessionID">Session ID.</param> /// <param name="socket">Server connected socket.</param> /// <param name="bindInfo">BindInfo what accepted socket.</param> /// <param name="server">Reference to server.</param> internal SMTP_Session(string sessionID,SocketEx socket,IPBindInfo bindInfo,SMTP_Server server) : base(sessionID,socket,bindInfo,server) { m_pServer = server; m_BodyType = BodyType.x7_bit; m_Forward_path = new Hashtable(); m_CmdValidator = new SMTP_Cmd_Validator(); // Start session proccessing StartSession(); }
private string m_UserName = ""; // Holds loggedIn UserName. #endregion Fields #region Constructors /// <summary> /// Default constructor. /// </summary> /// <param name="clientSocket">Referance to socket.</param> /// <param name="server">Referance to SMTP server.</param> /// <param name="logWriter">Log writer.</param> internal SMTP_Session(Socket clientSocket,SMTP_Server server,_LogWriter logWriter) { m_pSocket = new BufferedSocket(clientSocket); m_pServer = server; m_pLogWriter = logWriter; m_pMsgStream = new MemoryStream(); m_SessionID = Guid.NewGuid().ToString(); m_BodyType = BodyType.x7_bit; m_Forward_path = new Hashtable(); m_CmdValidator = new SMTP_Cmd_Validator(); m_SessionStart = DateTime.Now; m_LastDataTime = DateTime.Now; m_pSocket.SetSocketOption(SocketOptionLevel.Socket,SocketOptionName.NoDelay,1); // Start session proccessing StartSession(); }