#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"
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 |
#define DBG_SERVER LOG_STREAM(debug, log_server) |
Definition at line 52 of file server_base.cpp.
#define ERR_CONFIG LOG_STREAM(err, log_config) |
Definition at line 55 of file server_base.cpp.
#define ERR_SERVER LOG_STREAM(err, log_server) |
Definition at line 49 of file server_base.cpp.
#define LOG_SERVER LOG_STREAM(info, log_server) |
Definition at line 51 of file server_base.cpp.
#define WRN_CONFIG LOG_STREAM(warn, log_config) |
Definition at line 56 of file server_base.cpp.
#define WRN_SERVER LOG_STREAM(warn, log_server) |
Definition at line 50 of file server_base.cpp.
bool check_error | ( | const boost::system::error_code & | error, |
SocketPtr | socket | ||
) |
Definition at line 262 of file server_base.cpp.
References ERR_SERVER, log_address(), and LOG_SERVER.
Referenced by server_base::coro_receive_doc(), server_base::coro_send_doc(), coro_send_file_userspace(), and server_base::serve().
template bool check_error< tls_socket_ptr > | ( | const boost::system::error_code & | error, |
tls_socket_ptr | socket | ||
) |
std::string client_address | ( | SocketPtr | socket | ) |
Definition at line 252 of file server_base.cpp.
Referenced by log_address(), and server_base::serve().
void coro_send_file_userspace | ( | SocketPtr | socket, |
const std::string & | filename, | ||
boost::asio::yield_context | yield | ||
) |
Definition at line 332 of file server_base.cpp.
References check_error(), filesystem::file_size(), filename, filesystem::istream_file(), and utf8::size().
Referenced by server_base::coro_send_file().
std::string deprecated_message | ( | const std::string & | , |
DEP_LEVEL | , | ||
const version_info & | , | ||
const std::string & | |||
) |
Definition at line 673 of file server_base.cpp.
bool dump_wml = false |
Definition at line 58 of file server_base.cpp.
Referenced by server_base::coro_send_doc(), and main().
|
static |
|
static |