Skip to content
server.hh 1.06 KiB
Newer Older
Seblu's avatar
Seblu committed
/*
  This file is part of SLS.
  Copyright (C) 2008 Sebastien LUTTRINGER <contact@seblu.net>

  SLS is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
Seblu's avatar
Seblu committed
  the Free Software Foundation; version 2 of the License.
Seblu's avatar
Seblu committed

  SLS is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with SLS; if not, write to the Free Software
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
*/

#ifndef SERVER_HH
# define SERVER_HH

Seblu's avatar
Seblu committed
# include <set>

class Server {
public:
  typedef std::set<string> stringset;

public:
  Server();

  void start();
  void stop();
  void listen(size_t max_thread);

  bool started() const;

private:
  stringset logged_hosts_;
  stringset logged_users_;

  int socket_;
  size_t max_thread_;
Seblu's avatar
Seblu committed
  size_t thread_count_;
Seblu's avatar
Seblu committed
};

Seblu's avatar
Seblu committed
#endif