Classes | Defines | Functions | Variables

server/server.cpp File Reference

Wesnoth-Server, for multiplayer-games. More...

#include "server.hpp"
#include "../global.hpp"
#include "../config.hpp"
#include "../foreach.hpp"
#include "../game_config.hpp"
#include "../log.hpp"
#include "../map.hpp"
#include "../network.hpp"
#include "../filesystem.hpp"
#include "../multiplayer_error_codes.hpp"
#include "../serialization/parser.hpp"
#include "../serialization/preprocessor.hpp"
#include "../serialization/string_utils.hpp"
#include "../util.hpp"
#include "game.hpp"
#include "input_stream.hpp"
#include "metrics.hpp"
#include "player.hpp"
#include "proxy.hpp"
#include "simple_wml.hpp"
#include "ban.hpp"
#include "user_handler.hpp"
#include "sample_user_handler.hpp"
#include <boost/bind.hpp>
#include <boost/scoped_ptr.hpp>
#include <boost/scoped_array.hpp>
#include <boost/utility.hpp>
#include <algorithm>
#include <cassert>
#include <cerrno>
#include <cstdlib>
#include <iomanip>
#include <iostream>
#include <map>
#include <set>
#include <sstream>
#include <vector>
#include <queue>
#include <csignal>
#include <sys/times.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
Include dependency graph for server.cpp:

Go to the source code of this file.

Classes

class  fps_limiter

Defines

#define ERR_SERVER   LOG_STREAM(err, log_server)
 fatal and directly server related errors/warnings, ie not caused by erroneous client data
#define WRN_SERVER   LOG_STREAM(warn, log_server)
 clients send wrong/unexpected data
#define LOG_SERVER   LOG_STREAM(info, log_server)
 normal events
#define DBG_SERVER   LOG_STREAM(debug, log_server)
#define ERR_CONFIG   LOG_STREAM(err, log_config)
#define WRN_CONFIG   LOG_STREAM(warn, log_config)
#define SIGHUP   20
#define FIFODIR   "/var/run/wesnothd"

Functions

static void reload_config (int signal)
static void exit_sigint (int signal)
static void exit_sigterm (int signal)
int main (int argc, char **argv)

Variables

static lg::log_domain log_server ("server")
static lg::log_domain log_config ("config")
sig_atomic_t config_reload = 0
static fps_limiter fps_limit_

Detailed Description

Wesnoth-Server, for multiplayer-games.

Definition in file server.cpp.


Define Documentation

#define DBG_SERVER   LOG_STREAM(debug, log_server)
#define ERR_CONFIG   LOG_STREAM(err, log_config)

Definition at line 120 of file server.cpp.

Referenced by server::read_config().

#define ERR_SERVER   LOG_STREAM(err, log_server)

fatal and directly server related errors/warnings, ie not caused by erroneous client data

Definition at line 110 of file server.cpp.

Referenced by server::delete_game(), main(), server::process_data_game(), server::process_data_lobby(), server::process_login(), server::process_whisper(), server::run(), and server::start_new_server().

#define FIFODIR   "/var/run/wesnothd"

Referenced by server::load_config().

#define LOG_SERVER   LOG_STREAM(info, log_server)
#define SIGHUP   20

Definition at line 125 of file server.cpp.

Referenced by reload_config(), and server::server().

#define WRN_CONFIG   LOG_STREAM(warn, log_config)

Definition at line 121 of file server.cpp.

Referenced by server::run().

#define WRN_SERVER   LOG_STREAM(warn, log_server)

clients send wrong/unexpected data

Definition at line 113 of file server.cpp.

Referenced by server::process_data_game(), server::process_data_lobby(), server::process_query(), and server::run().


Function Documentation

static void exit_sigint ( int  signal  )  [static]

Definition at line 138 of file server.cpp.

References LOG_SERVER.

Referenced by server::server().

Here is the caller graph for this function:

static void exit_sigterm ( int  signal  )  [static]

Definition at line 144 of file server.cpp.

References LOG_SERVER.

Referenced by server::server().

Here is the caller graph for this function:

int main ( int  argc,
char **  argv 
)

Todo:
errno should be passed here with the error or it might not be the true errno anymore. Seems to work good enough for now though.

Definition at line 2750 of file server.cpp.

References ERR_SERVER, get_cwd(), game::error::message, game_config::path, lg::set_log_domain_severity(), network::set_raw_data_only(), lg::timestamps(), and game_config::version.

Here is the call graph for this function:

static void reload_config ( int  signal  )  [static]

Definition at line 132 of file server.cpp.

References SIGHUP.

Referenced by server::server().

Here is the caller graph for this function:


Variable Documentation

sig_atomic_t config_reload = 0
Todo:
FIXME: should define SIGINT here too, but to what?

Definition at line 129 of file server.cpp.

Definition at line 305 of file server.cpp.

lg::log_domain log_config("config") [static]
lg::log_domain log_server("server") [static]

Referenced by server::run().

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated by doxygen 1.7.1 on Fri May 25 2012 01:03:47 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs