Пример #1
0
        public void Start()
        {
            this.Running = true;
            TcpListener imapServer = new TcpListener(this.IP, Port);

            imapServer.Start();
            Trace.TraceInformation("Start imap server on {0}:{1}", IP.ToString(), Port);
            while (this.Running)
            {
                TcpClient   client  = imapServer.AcceptTcpClient();
                IMAPSession session = new IMAPSession(client);

                Thread thread = new Thread(new ParameterizedThreadStart(this.SessionStart));
                thread.Start(session);
            }
        }
Пример #2
0
        void SessionStart(object session)
        {
            IMAPSession sess = session as IMAPSession;

            sess.CommandLoop();
        }