Exemplo n.º 1
0
        /// <summary>
        /// Gest Pop33 messages info.
        /// </summary>
        /// <param name="session"></param>
        /// <param name="messages"></param>
        internal virtual void OnGetMessagesInfo(Pop3Session session, Pop3Messages messages)
        {
            GetMessagesInfo_EventArgs oArg = new GetMessagesInfo_EventArgs(session, messages, session.UserName);

            if (this.GetMessgesList != null)
            {
                this.GetMessgesList(this, oArg);
            }
        }
Exemplo n.º 2
0
		/// <summary>
		/// Default constructor.
		/// </summary>
		/// <param name="clientSocket">Referance to socket.</param>
		/// <param name="server">Referance to Pop33 server.</param>
		/// <param name="logWriter">Log writer.</param>
		public Pop3Session(Socket clientSocket,Pop3Server server,SocketLogger logWriter)
		{
			m_pSocket = new BufferedSocket(clientSocket);
			m_pServer = server;

			m_SessionID        = Guid.NewGuid().ToString();
			m_Pop3Messages    = new Pop3Messages();			
			m_SessionStartTime = DateTime.Now;
			m_LastDataTime     = DateTime.Now;

			if(m_pServer.LogCommands){
				m_pSocket.Logger = logWriter;
				m_pSocket.Logger.SessionID = m_SessionID;
			}			

			m_pSocket.SetSocketOption(SocketOptionLevel.Socket,SocketOptionName.NoDelay,1);
			m_pSocket.Activity += new EventHandler(OnSocketActivity);

			// Start session proccessing
			StartSession();
		}
Exemplo n.º 3
0
 /// <summary>
 /// Default constructor.
 /// </summary>
 /// <param name="session">Reference to Pop33 session.</param>
 /// <param name="messages"></param>
 /// <param name="mailbox">Mailbox name.</param>
 public GetMessagesInfo_EventArgs(Pop3Session session, Pop3Messages messages, string mailbox)
 {
     m_pSession      = session;
     m_pPop3Messages = messages;
     m_UserName      = mailbox;
 }
Exemplo n.º 4
0
 /// <summary>
 /// Default constructor.
 /// </summary>
 /// <param name="messages"></param>
 public Pop3Message(Pop3Messages messages)
 {
     m_pMessages = messages;
 }
Exemplo n.º 5
0
		/// <summary>
		/// Default constructor.
		/// </summary>
		/// <param name="messages"></param>
		public Pop3Message(Pop3Messages messages)
		{	
			m_pMessages = messages;
		}
		/// <summary>
		/// Default constructor.
		/// </summary>
		/// <param name="session">Reference to Pop33 session.</param>
		/// <param name="messages"></param>
		/// <param name="mailbox">Mailbox name.</param>
		public GetMessagesInfo_EventArgs(Pop3Session session,Pop3Messages messages,string mailbox)
		{
			m_pSession       = session;
			m_pPop3Messages = messages;
			m_UserName       = mailbox;
		}
Exemplo n.º 7
0
		/// <summary>
		/// Gest Pop33 messages info.
		/// </summary>
		/// <param name="session"></param>
		/// <param name="messages"></param>
		internal virtual void OnGetMessagesInfo(Pop3Session session,Pop3Messages messages) 
		{				
			GetMessagesInfo_EventArgs oArg = new GetMessagesInfo_EventArgs(session,messages,session.UserName);
			if(this.GetMessgesList != null){
				this.GetMessgesList(this, oArg);
			}
		}