The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Classes | Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
wesnothd::server Class Reference

#include <server.hpp>

Classes

struct  connection_log
 
struct  login_log
 

Public Member Functions

 server (int port, bool keep_alive, const std::string &config_file, size_t min_threads, size_t max_threads)
 
void run ()
 

Private Types

typedef std::function< void(server
*, const std::string &, const
std::string &, std::string
&, std::ostringstream *)> 
cmd_handler
 

Private Member Functions

void serve ()
 
void accept_connection (const boost::system::error_code &error, socket_ptr socket)
 
void serverside_handshake (socket_ptr socket)
 
void handle_handshake (const boost::system::error_code &error, socket_ptr socket, boost::shared_array< char > buf)
 
void request_version (const boost::system::error_code &error, socket_ptr socket)
 
void handle_version (socket_ptr socket)
 
void read_version (socket_ptr socket, boost::shared_ptr< simple_wml::document > doc)
 
void login (socket_ptr socket)
 
void handle_login (socket_ptr socket, boost::shared_ptr< simple_wml::document > doc)
 
void send_password_request (socket_ptr socket, const std::string &msg, const std::string &user, const char *error_code="", bool force_confirmation=false)
 
void add_player (socket_ptr socket, const wesnothd::player &)
 
void read_from_player (socket_ptr socket)
 
void handle_read_from_player (socket_ptr socket, boost::shared_ptr< simple_wml::document > doc)
 
void handle_player_in_lobby (socket_ptr socket, boost::shared_ptr< simple_wml::document > doc)
 
void handle_player_in_game (socket_ptr socket, boost::shared_ptr< simple_wml::document > doc)
 
void handle_whisper (socket_ptr socket, simple_wml::node &whisper)
 
void handle_query (socket_ptr socket, simple_wml::node &query)
 
void handle_nickserv (socket_ptr socket, simple_wml::node &nickserv)
 
void handle_message (socket_ptr socket, simple_wml::node &message)
 
void handle_create_game (socket_ptr socket, simple_wml::node &create_game)
 
void create_game (player_record &host, simple_wml::node &create_game)
 
void cleanup_game (game *)
 
void handle_join_game (socket_ptr socket, simple_wml::node &join)
 
void remove_player (socket_ptr socket)
 
void send_to_lobby (simple_wml::document &data, socket_ptr exclude=socket_ptr()) const
 
void send_server_message_to_lobby (const std::string &message, socket_ptr exclude=socket_ptr()) const
 
void send_server_message_to_all (const std::string &message, socket_ptr exclude=socket_ptr()) const
 
bool player_is_in_game (socket_ptr socket) const
 
std::deque< boost::shared_ptr
< game > > 
games ()
 
config read_config () const
 Read the server config from file 'config_file_'. More...
 
void load_config ()
 Parse the server config into local variables. More...
 
bool ip_exceeds_connection_limit (const std::string &ip) const
 
std::string is_ip_banned (const std::string &ip) const
 
void dump_stats (const time_t &now)
 
void clean_user_handler (const time_t &now)
 
std::string process_command (std::string cmd, std::string issuer_name)
 Process commands from admins and users. More...
 
void delete_game (int)
 
void update_game_in_lobby (const wesnothd::game &g, const socket_ptr &exclude=socket_ptr())
 
void start_new_server ()
 
void setup_fifo ()
 
void read_from_fifo ()
 
void handle_read_from_fifo (const boost::system::error_code &error, std::size_t bytes_transferred)
 
void setup_handlers ()
 
void shut_down_handler (const std::string &, const std::string &, std::string &, std::ostringstream *)
 
void restart_handler (const std::string &, const std::string &, std::string &, std::ostringstream *)
 
void sample_handler (const std::string &, const std::string &, std::string &, std::ostringstream *)
 
void help_handler (const std::string &, const std::string &, std::string &, std::ostringstream *)
 
void stats_handler (const std::string &, const std::string &, std::string &, std::ostringstream *)
 
void metrics_handler (const std::string &, const std::string &, std::string &, std::ostringstream *)
 
void requests_handler (const std::string &, const std::string &, std::string &, std::ostringstream *)
 
void games_handler (const std::string &, const std::string &, std::string &, std::ostringstream *)
 
void wml_handler (const std::string &, const std::string &, std::string &, std::ostringstream *)
 
void netstats_handler (const std::string &, const std::string &, std::string &, std::ostringstream *)
 
void adminmsg_handler (const std::string &, const std::string &, std::string &, std::ostringstream *)
 
void pm_handler (const std::string &, const std::string &, std::string &, std::ostringstream *)
 
void msg_handler (const std::string &, const std::string &, std::string &, std::ostringstream *)
 
void lobbymsg_handler (const std::string &, const std::string &, std::string &, std::ostringstream *)
 
void status_handler (const std::string &, const std::string &, std::string &, std::ostringstream *)
 
void clones_handler (const std::string &, const std::string &, std::string &, std::ostringstream *)
 
void bans_handler (const std::string &, const std::string &, std::string &, std::ostringstream *)
 
void ban_handler (const std::string &, const std::string &, std::string &, std::ostringstream *)
 
void unban_handler (const std::string &, const std::string &, std::string &, std::ostringstream *)
 
void ungban_handler (const std::string &, const std::string &, std::string &, std::ostringstream *)
 
void kick_handler (const std::string &, const std::string &, std::string &, std::ostringstream *)
 
void kickban_handler (const std::string &, const std::string &, std::string &, std::ostringstream *)
 
void gban_handler (const std::string &, const std::string &, std::string &, std::ostringstream *)
 
void motd_handler (const std::string &, const std::string &, std::string &, std::ostringstream *)
 
void searchlog_handler (const std::string &, const std::string &, std::string &, std::ostringstream *)
 
void dul_handler (const std::string &, const std::string &, std::string &, std::ostringstream *)
 
void handle_sighup (const boost::system::error_code &error, int signal_number)
 
void handle_termination (const boost::system::error_code &error, int signal_number)
 
void handle_graceful_timeout (const boost::system::error_code &error)
 

Private Attributes

boost::asio::io_service io_service_
 
boost::asio::ip::tcp::acceptor acceptor_
 
union {
   boost::uint32_t   connection_num
 
   char   buf [4]
 
handshake_response_
 
wesnothd::ban_manager ban_manager_
 
std::deque< connection_logip_log_
 
std::deque< login_logfailed_logins_
 
boost::scoped_ptr< user_handleruser_handler_
 
std::map< long int, std::stringseeds_
 
player_connections player_connections_
 
boost::asio::posix::stream_descriptor input_
 server socket/fifo. More...
 
std::string input_path_
 
const std::string config_file_
 
config cfg_
 
std::vector< std::stringaccepted_versions_
 
std::map< std::string, configredirected_versions_
 
std::map< std::string, configproxy_versions_
 
std::vector< std::stringdisallowed_names_
 
std::string admin_passwd_
 
std::string motd_
 
size_t default_max_messages_
 
size_t default_time_period_
 
size_t concurrent_connections_
 
bool graceful_restart
 
time_t lan_server_
 
time_t last_user_seen_time_
 
std::string restart_command
 
size_t max_ip_log_size_
 
std::string uh_name_
 
bool deny_unregistered_login_
 
bool save_replays_
 
std::string replay_save_path_
 
bool allow_remote_shutdown_
 
std::vector< std::stringtor_ip_list_
 
int failed_login_limit_
 
time_t failed_login_ban_
 
std::deque< login_log >::size_type failed_login_buffer_size_
 
simple_wml::document version_query_response_
 
simple_wml::document login_response_
 
simple_wml::document join_lobby_response_
 
simple_wml::document games_and_users_list_
 
metrics metrics_
 
time_t last_ping_
 
time_t last_stats_
 
time_t last_uh_clean_
 
boost::asio::streambuf admin_cmd_
 
std::map< std::string,
cmd_handler
cmd_handlers_
 
boost::asio::signal_set sighup_
 
boost::asio::signal_set sigs_
 
boost::asio::deadline_timer timer_
 

Detailed Description

Definition at line 35 of file server.hpp.

Member Typedef Documentation

typedef std::function<void(server*, const std::string&, const std::string&, std::string&, std::ostringstream *)> wesnothd::server::cmd_handler
private

Definition at line 205 of file server.hpp.

Constructor & Destructor Documentation

wesnothd::server::server ( int  port,
bool  keep_alive,
const std::string config_file,
size_t  min_threads,
size_t  max_threads 
)

Member Function Documentation

void wesnothd::server::accept_connection ( const boost::system::error_code &  error,
socket_ptr  socket 
)
private
void wesnothd::server::add_player ( socket_ptr  socket,
const wesnothd::player player 
)
private
void wesnothd::server::adminmsg_handler ( const std::string issuer_name,
const std::string ,
std::string parameters,
std::ostringstream *  out 
)
private
void wesnothd::server::ban_handler ( const std::string issuer_name,
const std::string ,
std::string parameters,
std::ostringstream *  out 
)
private
void wesnothd::server::bans_handler ( const std::string ,
const std::string ,
std::string parameters,
std::ostringstream *  out 
)
private
void wesnothd::server::clean_user_handler ( const time_t &  now)
private

Definition at line 716 of file server.cpp.

References last_uh_clean_, and user_handler_.

void wesnothd::server::cleanup_game ( game game_ptr)
private
void wesnothd::server::clones_handler ( const std::string ,
const std::string ,
std::string ,
std::ostringstream *  out 
)
private

Definition at line 2551 of file server.cpp.

References wesnothd::client_address(), next, player_connections_, and wesnothd::player_status().

Referenced by setup_handlers().

void wesnothd::server::create_game ( player_record host,
simple_wml::node create_game 
)
private
void wesnothd::server::delete_game ( int  gameid)
private
void wesnothd::server::dul_handler ( const std::string ,
const std::string ,
std::string parameters,
std::ostringstream *  out 
)
private

Definition at line 2926 of file server.cpp.

References deny_unregistered_login_, e, ERR_SERVER, and utf8::lowercase().

Referenced by setup_handlers().

void wesnothd::server::dump_stats ( const time_t &  now)
private

Definition at line 709 of file server.cpp.

References games(), last_stats_, LOG_SERVER, and player_connections_.

std::deque<boost::shared_ptr<game> > wesnothd::server::games ( )
inlineprivate

Definition at line 121 of file server.hpp.

Referenced by cleanup_game(), dump_stats(), handle_graceful_timeout(), and stats_handler().

void wesnothd::server::games_handler ( const std::string ,
const std::string ,
std::string ,
std::ostringstream *  out 
)
private

Definition at line 2383 of file server.cpp.

References metrics::games(), and metrics_.

Referenced by setup_handlers().

void wesnothd::server::gban_handler ( const std::string issuer_name,
const std::string ,
std::string parameters,
std::ostringstream *  out 
)
private
void wesnothd::server::handle_create_game ( socket_ptr  socket,
simple_wml::node create_game 
)
private
void wesnothd::server::handle_graceful_timeout ( const boost::system::error_code &  error)
private

Definition at line 460 of file server.cpp.

References games(), process_command(), and timer_.

Referenced by restart_handler(), and shut_down_handler().

void wesnothd::server::handle_handshake ( const boost::system::error_code &  error,
socket_ptr  socket,
boost::shared_array< char >  buf 
)
private
void wesnothd::server::handle_join_game ( socket_ptr  socket,
simple_wml::node join 
)
private
void wesnothd::server::handle_login ( socket_ptr  socket,
boost::shared_ptr< simple_wml::document doc 
)
private
void wesnothd::server::handle_message ( socket_ptr  socket,
simple_wml::node message 
)
private
void wesnothd::server::handle_nickserv ( socket_ptr  socket,
simple_wml::node nickserv 
)
private
void wesnothd::server::handle_player_in_game ( socket_ptr  socket,
boost::shared_ptr< simple_wml::document doc 
)
private
Todo:
FIXME: Why not save the level data in the history_?

&& cfg_change->child("side") it is very likeley that the diff changes a side so this check isn't that important. Note that [side] is not at toplevel but inside [scenario] or [snapshot]

Definition at line 1517 of file server.cpp.

References simple_wml::node::add_child(), simple_wml::node::apply_diff(), simple_wml::document::attr(), wesnothd::game::ban_user(), simple_wml::node::child(), simple_wml::document::child(), simple_wml::node::children(), simple_wml::document::children(), simple_wml::document::clear(), wesnothd::client_address(), wesnothd::player::config_address(), simple_wml::node::copy_into(), DBG_SERVER, delete_game(), wesnothd::game::describe_slots(), wesnothd::game::description(), e, wesnothd::player_record::enter_lobby(), ERR_SERVER, games_and_users_list_, wesnothd::game::handle_choice(), simple_wml::node::has_attr(), wesnothd::game::id(), lg::info(), simple_wml::INIT_COMPRESSED, wesnothd::game::is_owner(), wesnothd::game::is_player(), wesnothd::game::kick_member(), wesnothd::game::level(), wesnothd::game::level_init(), wesnothd::game::load_next_scenario(), LOG_SERVER, wesnothd::make_add_diff(), wesnothd::make_change_diff(), wesnothd::game::mute_all_observers(), wesnothd::game::mute_observer(), wesnothd::game::name, wesnothd::player::name(), wesnothd::game::nplayers(), simple_wml::document::output(), wesnothd::game::perform_controller_tweaks(), player_connections_, wesnothd::game::process_change_turns_wml(), wesnothd::game::process_message(), wesnothd::game::process_turn(), wesnothd::game::process_whiteboard(), wesnothd::game::remove_player(), wesnothd::game::reset_last_synced_context_id(), simple_wml::document::root(), wesnothd::game::save_replay(), wesnothd::game::send_data(), wesnothd::send_server_message(), wesnothd::game::send_server_message(), wesnothd::game::send_server_message_to_all(), send_to_lobby(), wesnothd::send_to_player(), simple_wml::node::set_attr(), simple_wml::node::set_attr_dup(), wesnothd::game::set_description(), wesnothd::game::set_termination_reason(), wesnothd::game::start_game(), wesnothd::game::started(), wesnothd::game::starting_pos(), simple_wml::document::swap(), simple_wml::string_span::to_bool(), wesnothd::game::transfer_side_control(), wesnothd::game::unban_user(), wesnothd::game::unmute_observer(), wesnothd::game::update_game(), update_game_in_lobby(), wesnothd::game::update_side_data(), and WRN_SERVER.

Referenced by handle_read_from_player().

void wesnothd::server::handle_player_in_lobby ( socket_ptr  socket,
boost::shared_ptr< simple_wml::document doc 
)
private
void wesnothd::server::handle_query ( socket_ptr  socket,
simple_wml::node query 
)
private
void wesnothd::server::handle_read_from_fifo ( const boost::system::error_code &  error,
std::size_t  bytes_transferred 
)
private

Definition at line 494 of file server.cpp.

References admin_cmd_, LOG_SERVER, process_command(), and read_from_fifo().

Referenced by read_from_fifo().

void wesnothd::server::handle_read_from_player ( socket_ptr  socket,
boost::shared_ptr< simple_wml::document doc 
)
private
void wesnothd::server::handle_sighup ( const boost::system::error_code &  error,
int  signal_number 
)
private

Definition at line 436 of file server.cpp.

References cfg_, load_config(), read_config(), sighup_, and WRN_SERVER.

Referenced by server().

void wesnothd::server::handle_termination ( const boost::system::error_code &  error,
int  signal_number 
)
private

Definition at line 448 of file server.cpp.

References lexical_cast(), and LOG_SERVER.

Referenced by server().

void wesnothd::server::handle_version ( socket_ptr  socket)
private

Definition at line 792 of file server.cpp.

References wesnothd::async_receive_doc(), and read_version().

Referenced by request_version().

void wesnothd::server::handle_whisper ( socket_ptr  socket,
simple_wml::node whisper 
)
private
void wesnothd::server::help_handler ( const std::string ,
const std::string ,
std::string ,
std::ostringstream *  out 
)
private

Definition at line 2361 of file server.cpp.

References wesnothd::help_msg.

Referenced by setup_handlers().

bool wesnothd::server::ip_exceeds_connection_limit ( const std::string ip) const
private
std::string wesnothd::server::is_ip_banned ( const std::string ip) const
private
void wesnothd::server::kick_handler ( const std::string ,
const std::string ,
std::string parameters,
std::ostringstream *  out 
)
private
void wesnothd::server::kickban_handler ( const std::string issuer_name,
const std::string ,
std::string parameters,
std::ostringstream *  out 
)
private
void wesnothd::server::load_config ( )
private
void wesnothd::server::lobbymsg_handler ( const std::string ,
const std::string ,
std::string parameters,
std::ostringstream *  out 
)
private

Definition at line 2502 of file server.cpp.

References LOG_SERVER, and send_server_message_to_lobby().

void wesnothd::server::login ( socket_ptr  socket)
private

Definition at line 851 of file server.cpp.

References wesnothd::async_receive_doc(), and handle_login().

Referenced by handle_login(), read_version(), and send_password_request().

void wesnothd::server::metrics_handler ( const std::string ,
const std::string ,
std::string ,
std::ostringstream *  out 
)
private

Definition at line 2373 of file server.cpp.

References metrics_.

Referenced by setup_handlers().

void wesnothd::server::motd_handler ( const std::string ,
const std::string ,
std::string parameters,
std::ostringstream *  out 
)
private

Definition at line 2877 of file server.cpp.

References motd_, and parameters.

Referenced by setup_handlers().

void wesnothd::server::msg_handler ( const std::string ,
const std::string ,
std::string parameters,
std::ostringstream *  out 
)
private

Definition at line 2485 of file server.cpp.

References LOG_SERVER, and send_server_message_to_all().

Referenced by setup_handlers().

void wesnothd::server::netstats_handler ( const std::string ,
const std::string ,
std::string ,
std::ostringstream *   
)
private

Definition at line 2393 of file server.cpp.

Referenced by setup_handlers().

bool wesnothd::server::player_is_in_game ( socket_ptr  socket) const
inlineprivate

Definition at line 80 of file server.hpp.

References player_connections_.

Referenced by handle_read_from_player().

void wesnothd::server::pm_handler ( const std::string issuer_name,
const std::string ,
std::string parameters,
std::ostringstream *  out 
)
private
std::string wesnothd::server::process_command ( std::string  cmd,
std::string  issuer_name 
)
private
config wesnothd::server::read_config ( ) const
private

Read the server config from file 'config_file_'.

Definition at line 576 of file server.cpp.

References config_file_, e, ERR_CONFIG, LOG_SERVER, game::error::message, preprocess_file(), and read().

Referenced by handle_sighup().

void wesnothd::server::read_from_fifo ( )
private

Definition at line 488 of file server.cpp.

References admin_cmd_, handle_read_from_fifo(), and input_.

Referenced by handle_read_from_fifo(), and setup_fifo().

void wesnothd::server::read_from_player ( socket_ptr  socket)
private
void wesnothd::server::read_version ( socket_ptr  socket,
boost::shared_ptr< simple_wml::document doc 
)
private
void wesnothd::server::remove_player ( socket_ptr  socket)
private
void wesnothd::server::request_version ( const boost::system::error_code &  error,
socket_ptr  socket 
)
private
void wesnothd::server::requests_handler ( const std::string ,
const std::string ,
std::string ,
std::ostringstream *  out 
)
private

Definition at line 2378 of file server.cpp.

References metrics_, and metrics::requests().

Referenced by setup_handlers().

void wesnothd::server::restart_handler ( const std::string issuer_name,
const std::string ,
std::string ,
std::ostringstream *  out 
)
private
void wesnothd::server::run ( )

Definition at line 1944 of file server.cpp.

References e, io_service_, and LOG_SERVER.

Referenced by main().

void wesnothd::server::sample_handler ( const std::string issuer_name,
const std::string ,
std::string parameters,
std::ostringstream *  out 
)
private

Definition at line 2343 of file server.cpp.

References wesnothd::denied_msg, and wesnothd::request_sample_frequency.

Referenced by setup_handlers().

void wesnothd::server::searchlog_handler ( const std::string ,
const std::string ,
std::string parameters,
std::ostringstream *  out 
)
private
void wesnothd::server::send_password_request ( socket_ptr  socket,
const std::string msg,
const std::string user,
const char *  error_code = "",
bool  force_confirmation = false 
)
private
void wesnothd::server::send_server_message_to_all ( const std::string message,
socket_ptr  exclude = socket_ptr() 
) const
private

Definition at line 1936 of file server.cpp.

References player_connections_, and wesnothd::send_server_message().

Referenced by msg_handler().

void wesnothd::server::send_server_message_to_lobby ( const std::string message,
socket_ptr  exclude = socket_ptr() 
) const
private

Definition at line 1928 of file server.cpp.

References player_connections_, and wesnothd::send_server_message().

Referenced by lobbymsg_handler().

void wesnothd::server::send_to_lobby ( simple_wml::document data,
socket_ptr  exclude = socket_ptr() 
) const
private
void wesnothd::server::serve ( )
private

Definition at line 724 of file server.cpp.

References accept_connection(), acceptor_, and io_service_.

Referenced by accept_connection(), and server().

void wesnothd::server::serverside_handshake ( socket_ptr  socket)
private

Definition at line 758 of file server.cpp.

References handle_handshake().

Referenced by accept_connection().

void wesnothd::server::setup_fifo ( )
private

Definition at line 473 of file server.cpp.

References ERR_SERVER, input_, input_path_, LOG_SERVER, and read_from_fifo().

Referenced by load_config().

void wesnothd::server::setup_handlers ( )
private
void wesnothd::server::shut_down_handler ( const std::string issuer_name,
const std::string ,
std::string parameters,
std::ostringstream *  out 
)
private
void wesnothd::server::start_new_server ( )
private

Definition at line 2237 of file server.cpp.

References ERR_SERVER, LOG_SERVER, and restart_command.

Referenced by restart_handler().

void wesnothd::server::stats_handler ( const std::string ,
const std::string ,
std::string ,
std::ostringstream *  out 
)
private

Definition at line 2366 of file server.cpp.

References games(), and player_connections_.

Referenced by setup_handlers().

void wesnothd::server::status_handler ( const std::string issuer_name,
const std::string ,
std::string parameters,
std::ostringstream *  out 
)
private
void wesnothd::server::unban_handler ( const std::string ,
const std::string ,
std::string parameters,
std::ostringstream *  out 
)
private

Definition at line 2822 of file server.cpp.

References ban_manager_, and wesnothd::ban_manager::unban().

Referenced by setup_handlers().

void wesnothd::server::ungban_handler ( const std::string ,
const std::string ,
std::string parameters,
std::ostringstream *  out 
)
private

Definition at line 2832 of file server.cpp.

References ban_manager_, and wesnothd::ban_manager::unban_group().

Referenced by setup_handlers().

void wesnothd::server::update_game_in_lobby ( const wesnothd::game g,
const socket_ptr exclude = socket_ptr() 
)
private
void wesnothd::server::wml_handler ( const std::string ,
const std::string ,
std::string ,
std::ostringstream *  out 
)
private

Definition at line 2388 of file server.cpp.

References simple_wml::document::stats().

Referenced by setup_handlers().

Member Data Documentation

std::vector<std::string> wesnothd::server::accepted_versions_
private

Definition at line 144 of file server.hpp.

Referenced by load_config(), and read_version().

boost::asio::ip::tcp::acceptor wesnothd::server::acceptor_
private

Definition at line 42 of file server.hpp.

Referenced by restart_handler(), serve(), server(), and shut_down_handler().

boost::asio::streambuf wesnothd::server::admin_cmd_
private

Definition at line 201 of file server.hpp.

Referenced by handle_read_from_fifo(), and read_from_fifo().

std::string wesnothd::server::admin_passwd_
private

Definition at line 148 of file server.hpp.

Referenced by handle_query(), and load_config().

bool wesnothd::server::allow_remote_shutdown_
private

Definition at line 162 of file server.hpp.

Referenced by load_config(), restart_handler(), and shut_down_handler().

wesnothd::ban_manager wesnothd::server::ban_manager_
private
char wesnothd::server::buf[4]

Definition at line 48 of file server.hpp.

config wesnothd::server::cfg_
private

Definition at line 138 of file server.hpp.

Referenced by handle_sighup(), and load_config().

std::map<std::string, cmd_handler> wesnothd::server::cmd_handlers_
private

Definition at line 206 of file server.hpp.

Referenced by process_command(), and setup_handlers().

size_t wesnothd::server::concurrent_connections_
private

Definition at line 152 of file server.hpp.

Referenced by load_config().

const std::string wesnothd::server::config_file_
private

Definition at line 137 of file server.hpp.

Referenced by read_config().

boost::uint32_t wesnothd::server::connection_num

Definition at line 47 of file server.hpp.

size_t wesnothd::server::default_max_messages_
private

Definition at line 150 of file server.hpp.

Referenced by handle_login(), and load_config().

size_t wesnothd::server::default_time_period_
private

Definition at line 151 of file server.hpp.

Referenced by handle_login(), and load_config().

bool wesnothd::server::deny_unregistered_login_
private

Definition at line 159 of file server.hpp.

Referenced by dul_handler(), handle_login(), and load_config().

std::vector<std::string> wesnothd::server::disallowed_names_
private

Definition at line 147 of file server.hpp.

Referenced by handle_login(), and load_config().

time_t wesnothd::server::failed_login_ban_
private

Definition at line 165 of file server.hpp.

Referenced by handle_login(), and load_config().

std::deque<login_log>::size_type wesnothd::server::failed_login_buffer_size_
private

Definition at line 166 of file server.hpp.

Referenced by handle_login(), and load_config().

int wesnothd::server::failed_login_limit_
private

Definition at line 164 of file server.hpp.

Referenced by handle_login(), and load_config().

std::deque<login_log> wesnothd::server::failed_logins_
private

Definition at line 115 of file server.hpp.

Referenced by handle_login().

simple_wml::document wesnothd::server::games_and_users_list_
private
bool wesnothd::server::graceful_restart
private
union { ... } wesnothd::server::handshake_response_

Referenced by handle_handshake(), and server().

boost::asio::posix::stream_descriptor wesnothd::server::input_
private

server socket/fifo.

Definition at line 133 of file server.hpp.

Referenced by load_config(), read_from_fifo(), and setup_fifo().

std::string wesnothd::server::input_path_
private

Definition at line 135 of file server.hpp.

Referenced by load_config(), and setup_fifo().

boost::asio::io_service wesnothd::server::io_service_
private

Definition at line 41 of file server.hpp.

Referenced by run(), and serve().

std::deque<connection_log> wesnothd::server::ip_log_
private

Definition at line 99 of file server.hpp.

Referenced by handle_login(), remove_player(), and searchlog_handler().

simple_wml::document wesnothd::server::join_lobby_response_
private

Definition at line 176 of file server.hpp.

Referenced by handle_login().

time_t wesnothd::server::lan_server_
private

Definition at line 154 of file server.hpp.

Referenced by load_config().

time_t wesnothd::server::last_ping_
private

Definition at line 181 of file server.hpp.

time_t wesnothd::server::last_stats_
private

Definition at line 182 of file server.hpp.

Referenced by dump_stats().

time_t wesnothd::server::last_uh_clean_
private

Definition at line 185 of file server.hpp.

Referenced by clean_user_handler().

time_t wesnothd::server::last_user_seen_time_
private

Definition at line 155 of file server.hpp.

simple_wml::document wesnothd::server::login_response_
private

Definition at line 175 of file server.hpp.

Referenced by read_version().

size_t wesnothd::server::max_ip_log_size_
private

Definition at line 157 of file server.hpp.

Referenced by handle_login(), and load_config().

metrics wesnothd::server::metrics_
private

Definition at line 179 of file server.hpp.

Referenced by cleanup_game(), games_handler(), metrics_handler(), and requests_handler().

std::string wesnothd::server::motd_
private

Definition at line 149 of file server.hpp.

Referenced by add_player(), load_config(), and motd_handler().

player_connections wesnothd::server::player_connections_
private
std::map<std::string,config> wesnothd::server::proxy_versions_
private

Definition at line 146 of file server.hpp.

Referenced by load_config().

std::map<std::string,config> wesnothd::server::redirected_versions_
private

Definition at line 145 of file server.hpp.

Referenced by load_config(), and read_version().

std::string wesnothd::server::replay_save_path_
private

Definition at line 161 of file server.hpp.

Referenced by create_game(), and load_config().

std::string wesnothd::server::restart_command
private

Definition at line 156 of file server.hpp.

Referenced by load_config(), restart_handler(), and start_new_server().

bool wesnothd::server::save_replays_
private

Definition at line 160 of file server.hpp.

Referenced by create_game(), and load_config().

std::map<long int,std::string> wesnothd::server::seeds_
private

Definition at line 118 of file server.hpp.

Referenced by handle_login(), and send_password_request().

boost::asio::signal_set wesnothd::server::sighup_
private

Definition at line 236 of file server.hpp.

Referenced by handle_sighup(), and server().

boost::asio::signal_set wesnothd::server::sigs_
private

Definition at line 239 of file server.hpp.

Referenced by server().

boost::asio::deadline_timer wesnothd::server::timer_
private

Definition at line 242 of file server.hpp.

Referenced by handle_graceful_timeout(), restart_handler(), and shut_down_handler().

std::vector<std::string> wesnothd::server::tor_ip_list_
private

Definition at line 163 of file server.hpp.

Referenced by is_ip_banned(), and load_config().

std::string wesnothd::server::uh_name_
private

Definition at line 158 of file server.hpp.

Referenced by load_config().

boost::scoped_ptr<user_handler> wesnothd::server::user_handler_
private
simple_wml::document wesnothd::server::version_query_response_
private

Definition at line 174 of file server.hpp.

Referenced by request_version().


The documentation for this class was generated from the following files: