The Battle for Wesnoth  1.19.7+dev
Namespaces | Macros | Functions | Variables
server.cpp File Reference

Wesnoth addon server. More...

#include "server/campaignd/server.hpp"
#include "filesystem.hpp"
#include "lexical_cast.hpp"
#include "log.hpp"
#include "serialization/base64.hpp"
#include "serialization/binary_or_text.hpp"
#include "serialization/chrono.hpp"
#include "serialization/parser.hpp"
#include "serialization/string_utils.hpp"
#include "serialization/unicode.hpp"
#include "addon/validation.hpp"
#include "server/campaignd/addon_utils.hpp"
#include "server/campaignd/auth.hpp"
#include "server/campaignd/blacklist.hpp"
#include "server/campaignd/control.hpp"
#include "server/campaignd/fs_commit.hpp"
#include "server/campaignd/options.hpp"
#include "game_version.hpp"
#include "hash.hpp"
#include "utils/optimer.hpp"
#include <csignal>
#include <ctime>
#include <iomanip>
#include <iostream>
#include <utility>
#include <errno.h>
Include dependency graph for server.cpp:

Go to the source code of this file.

Namespaces

 campaignd
 

Macros

#define DBG_CS   LOG_STREAM(debug, log_campaignd)
 
#define LOG_CS   LOG_STREAM(info, log_campaignd)
 
#define WRN_CS   LOG_STREAM(warn, log_campaignd)
 
#define ERR_CS   LOG_STREAM(err, log_campaignd)
 
#define ERR_CONFIG   LOG_STREAM(err, log_config)
 
#define WRN_CONFIG   LOG_STREAM(warn, log_config)
 
#define ERR_SERVER   LOG_STREAM(err, log_server)
 
#define REGISTER_CAMPAIGND_HANDLER(req_id)
 

Functions

std::ostream & campaignd::operator<< (std::ostream &o, const server::request &r)
 
std::string campaignd::client_address (const any_socket_ptr &sock)
 
static int run_campaignd (int argc, char **argv)
 
int main (int argc, char **argv)
 

Variables

static lg::log_domain log_campaignd ("campaignd")
 
static lg::log_domain log_config ("config")
 
static lg::log_domain log_server ("server")
 

Detailed Description

Wesnoth addon server.

Expects a "server.cfg" config file in the current directory and saves addons under data/.

Definition in file server.cpp.

Macro Definition Documentation

◆ DBG_CS

#define DBG_CS   LOG_STREAM(debug, log_campaignd)

Definition at line 63 of file server.cpp.

◆ ERR_CONFIG

#define ERR_CONFIG   LOG_STREAM(err, log_config)

Definition at line 69 of file server.cpp.

◆ ERR_CS

#define ERR_CS   LOG_STREAM(err, log_campaignd)

Definition at line 66 of file server.cpp.

◆ ERR_SERVER

#define ERR_SERVER   LOG_STREAM(err, log_server)

Definition at line 73 of file server.cpp.

◆ LOG_CS

#define LOG_CS   LOG_STREAM(info, log_campaignd)

Definition at line 64 of file server.cpp.

◆ REGISTER_CAMPAIGND_HANDLER

#define REGISTER_CAMPAIGND_HANDLER (   req_id)
Value:
handlers_[#req_id] = std::bind(&server::handle_##req_id, \
std::placeholders::_1, std::placeholders::_2)

Definition at line 933 of file server.cpp.

◆ WRN_CONFIG

#define WRN_CONFIG   LOG_STREAM(warn, log_config)

Definition at line 70 of file server.cpp.

◆ WRN_CS

#define WRN_CS   LOG_STREAM(warn, log_campaignd)

Definition at line 65 of file server.cpp.

Function Documentation

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 2072 of file server.cpp.

References e, PLAIN_LOG, and run_campaignd().

◆ run_campaignd()

static int run_campaignd ( int  argc,
char **  argv 
)
static

Variable Documentation

◆ log_campaignd

lg::log_domain log_campaignd("campaignd") ( "campaignd"  )
static

◆ log_config

lg::log_domain log_config("config") ( "config"  )
static

◆ log_server

lg::log_domain log_server("server") ( "server"  )
static