The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Classes | Namespaces | Macros | Functions
network_worker.hpp File Reference
#include <map>
#include "network.hpp"
Include dependency graph for network_worker.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  network_worker_pool::manager
 

Namespaces

 network_worker_pool
 

Macros

#define ALIGN_4
 Aligns a variable on a 4 byte boundary. More...
 

Functions

network::pending_statistics network_worker_pool::get_pending_stats ()
 
void network_worker_pool::set_raw_data_only ()
 
void network_worker_pool::set_use_system_sendfile (bool use)
 
void network_worker_pool::receive_data (TCPsocket sock)
 Function to asynchronously received data to the given socket. More...
 
TCPsocket network_worker_pool::get_received_data (TCPsocket sock, config &cfg, network::bandwidth_in_ptr &bandwidth_in)
 
TCPsocket network_worker_pool::get_received_data (std::vector< char > &out)
 
void network_worker_pool::queue_file (TCPsocket sock, const std::string &filename)
 
void network_worker_pool::queue_raw_data (TCPsocket sock, const char *buf, int len)
 
size_t network_worker_pool::queue_data (TCPsocket sock, const config &buf, const std::string &packet_type)
 
bool network_worker_pool::is_locked (const TCPsocket sock)
 
bool network_worker_pool::close_socket (TCPsocket sock)
 
TCPsocket network_worker_pool::detect_error ()
 
std::pair< network::statistics,
network::statistics
network_worker_pool::get_current_transfer_stats (TCPsocket sock)
 

Macro Definition Documentation

#define ALIGN_4

Aligns a variable on a 4 byte boundary.

The address needs to be aligned on a Sparc system, if it's not aligned the SDLNet_Read32 call will cause a SIGBUS and the server will be terminated [1]. Best use this alignment for all buffers used in for the SDL_Net calls.

[1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=426318

Definition at line 35 of file network_worker.hpp.

Referenced by network::receive_data().