private void ProcessSocket(SimpleSocket s) { var session = new Session(s, new MailMessageHandler(OnMessageRecieved)); while (s.Connected && Running) { ProcessCommand(session.Socket.GetNextCommand(), session); } }
private void ProcessCommand(string commandLine, Session session) { if (commandLine != null) { var command = ParseCommand(commandLine); if (VerbStore.ContainsKey(command)) { session.Commands.Add(commandLine); VerbStore[command].Invoke(session); } else { session.Socket.SendString(SmtpCommandUtils.SV_UNKNOWN); } } }