Base class for servers using Wesnoth's WML over TCP protocol. More...
#include "exceptions.hpp"
#include "server/common/simple_wml.hpp"
#include "utils/variant.hpp"
#include "utils/general.hpp"
#include "utils/optional_fwd.hpp"
#include <boost/asio/io_context.hpp>
#include <boost/asio/ip/tcp.hpp>
#include <boost/asio/posix/stream_descriptor.hpp>
#include <boost/asio/signal_set.hpp>
#include <boost/asio/streambuf.hpp>
#include <boost/asio/ssl.hpp>
#include <boost/asio/spawn.hpp>
#include <boost/shared_array.hpp>
#include <map>
Go to the source code of this file.
Classes | |
struct | server_shutdown |
class | server_base |
Base class for implementing servers that use gzipped-WML network protocol. More... | |
struct | server_base::login_ban_info |
Typedefs | |
typedef std::shared_ptr< boost::asio::ip::tcp::socket > | socket_ptr |
typedef std::shared_ptr< boost::asio::ssl::stream< socket_ptr::element_type > > | tls_socket_ptr |
typedef utils::variant< socket_ptr, tls_socket_ptr > | any_socket_ptr |
Functions | |
template<class SocketPtr > | |
std::string | client_address (SocketPtr socket) |
template<class SocketPtr > | |
std::string | log_address (SocketPtr socket) |
template<class SocketPtr > | |
bool | check_error (const boost::system::error_code &error, SocketPtr socket) |
Variables | |
bool | dump_wml |
Base class for servers using Wesnoth's WML over TCP protocol.
Definition in file server_base.hpp.
typedef utils::variant<socket_ptr, tls_socket_ptr> any_socket_ptr |
Definition at line 53 of file server_base.hpp.
typedef std::shared_ptr<boost::asio::ip::tcp::socket> socket_ptr |
Definition at line 51 of file server_base.hpp.
typedef std::shared_ptr<boost::asio::ssl::stream<socket_ptr::element_type> > tls_socket_ptr |
Definition at line 52 of file server_base.hpp.
bool check_error | ( | const boost::system::error_code & | error, |
SocketPtr | socket | ||
) |
Definition at line 279 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().
std::string client_address | ( | SocketPtr | socket | ) |
Definition at line 269 of file server_base.cpp.
Referenced by log_address(), and server_base::serve().
std::string log_address | ( | SocketPtr | socket | ) |
Definition at line 180 of file server_base.hpp.
References client_address(), and utils::decayed_is_same.
Referenced by wesnothd::server::authenticate(), check_error(), server_base::coro_receive_doc(), server_base::coro_send_doc(), wesnothd::server::is_login_allowed(), wesnothd::server::login_client(), and server_base::serve().
|
extern |
Definition at line 62 of file server_base.cpp.
Referenced by server_base::coro_send_doc(), and main().