The Battle for Wesnoth  1.19.5+dev
Macros | Functions | Variables
server_base.cpp File Reference
#include "server/common/server_base.hpp"
#include "config.hpp"
#include "hash.hpp"
#include "log.hpp"
#include "filesystem.hpp"
#include "utils/scope_exit.hpp"
#include <boost/asio/ip/v6_only.hpp>
#include <boost/asio/read.hpp>
#include <boost/asio/read_until.hpp>
#include <queue>
#include <string>
#include <iostream>
#include "deprecation.hpp"
Include dependency graph for server_base.cpp:

Go to the source code of this file.

Macros

#define ERR_SERVER   LOG_STREAM(err, log_server)
 
#define WRN_SERVER   LOG_STREAM(warn, log_server)
 
#define LOG_SERVER   LOG_STREAM(info, log_server)
 
#define DBG_SERVER   LOG_STREAM(debug, log_server)
 
#define ERR_CONFIG   LOG_STREAM(err, log_config)
 
#define WRN_CONFIG   LOG_STREAM(warn, log_config)
 

Functions

template<class SocketPtr >
std::string client_address (SocketPtr socket)
 
template<class SocketPtr >
bool check_error (const boost::system::error_code &error, SocketPtr socket)
 
template bool check_error< tls_socket_ptr > (const boost::system::error_code &error, tls_socket_ptr socket)
 
template<class SocketPtr >
void coro_send_file_userspace (SocketPtr socket, const std::string &filename, boost::asio::yield_context yield)
 
std::string deprecated_message (const std::string &, DEP_LEVEL, const version_info &, const std::string &)
 

Variables

static lg::log_domain log_server ("server")
 
static lg::log_domain log_config ("config")
 
bool dump_wml = false
 

Macro Definition Documentation

◆ DBG_SERVER

#define DBG_SERVER   LOG_STREAM(debug, log_server)

Definition at line 52 of file server_base.cpp.

◆ ERR_CONFIG

#define ERR_CONFIG   LOG_STREAM(err, log_config)

Definition at line 55 of file server_base.cpp.

◆ ERR_SERVER

#define ERR_SERVER   LOG_STREAM(err, log_server)

Definition at line 49 of file server_base.cpp.

◆ LOG_SERVER

#define LOG_SERVER   LOG_STREAM(info, log_server)

Definition at line 51 of file server_base.cpp.

◆ WRN_CONFIG

#define WRN_CONFIG   LOG_STREAM(warn, log_config)

Definition at line 56 of file server_base.cpp.

◆ WRN_SERVER

#define WRN_SERVER   LOG_STREAM(warn, log_server)

Definition at line 50 of file server_base.cpp.

Function Documentation

◆ check_error()

template<class SocketPtr >
bool check_error ( const boost::system::error_code &  error,
SocketPtr  socket 
)

◆ check_error< tls_socket_ptr >()

template bool check_error< tls_socket_ptr > ( const boost::system::error_code &  error,
tls_socket_ptr  socket 
)

◆ client_address()

template<class SocketPtr >
std::string client_address ( SocketPtr  socket)

Definition at line 252 of file server_base.cpp.

Referenced by log_address(), and server_base::serve().

◆ coro_send_file_userspace()

template<class SocketPtr >
void coro_send_file_userspace ( SocketPtr  socket,
const std::string &  filename,
boost::asio::yield_context  yield 
)

◆ deprecated_message()

std::string deprecated_message ( const std::string &  ,
DEP_LEVEL  ,
const version_info ,
const std::string &   
)

Definition at line 673 of file server_base.cpp.

Variable Documentation

◆ dump_wml

bool dump_wml = false

Definition at line 58 of file server_base.cpp.

Referenced by server_base::coro_send_doc(), and main().

◆ log_config

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

◆ log_server

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