public void OnClientConnect(ISocket clientSocket) { if (_closed) { return; } SmtpLog.Info("Client connected"); ListenForClients(); var session = new SmtpSession(clientSocket) { OnMessage = (msg) => _messages.Add(msg) }; session.Start(); _sessions.Add(session); }
public void Start() { Listener.Start(); SmtpLog.Info(string.Format("Server started at {0}", new IPEndPoint(Address, Port))); ListenForClients(); }