The Battle for Wesnoth  1.15.0-dev
Classes | Typedefs | Functions
server_base.hpp File Reference

Base class for servers using Wesnoth's WML over TCP protocol. More...

#include "exceptions.hpp"
#include <boost/asio.hpp>
#include <boost/asio/signal_set.hpp>
#include <boost/shared_array.hpp>
Include dependency graph for server_base.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  server_shutdown
 
class  server_base
 

Typedefs

typedef std::shared_ptr< boost::asio::ip::tcp::socket > socket_ptr
 

Functions

std::string client_address (socket_ptr socket)
 
bool check_error (const boost::system::error_code &error, socket_ptr socket)
 
void async_send_error (socket_ptr socket, const std::string &msg, const char *error_code="")
 
void async_send_warning (socket_ptr socket, const std::string &msg, const char *warning_code="")
 
void async_send_message (socket_ptr socket, const std::string &msg)
 

Detailed Description

Base class for servers using Wesnoth's WML over TCP protocol.

Definition in file server_base.hpp.

Typedef Documentation

◆ socket_ptr

typedef std::shared_ptr<boost::asio::ip::tcp::socket> socket_ptr

Definition at line 28 of file server_base.hpp.

Function Documentation

◆ async_send_error()

void async_send_error ( socket_ptr  socket,
const std::string &  msg,
const char *  error_code = "" 
)

◆ async_send_message()

void async_send_message ( socket_ptr  socket,
const std::string &  msg 
)

◆ async_send_warning()

void async_send_warning ( socket_ptr  socket,
const std::string &  msg,
const char *  warning_code = "" 
)

◆ check_error()

bool check_error ( const boost::system::error_code &  error,
socket_ptr  socket 
)

◆ client_address()

std::string client_address ( socket_ptr  socket)