The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Classes | Functions
network_worker_pool Namespace Reference

Classes

struct  manager
 

Functions

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

Function Documentation

bool network_worker_pool::close_socket ( TCPsocket  sock)

Definition at line 1018 of file network_worker.cpp.

References schema_validation::remove.

Referenced by network::disconnect().

TCPsocket network_worker_pool::detect_error ( )

Definition at line 1045 of file network_worker.cpp.

References i, NUM_SHARDS, and schema_validation::remove.

Referenced by check_error().

std::pair< network::statistics, network::statistics > network_worker_pool::get_current_transfer_stats ( TCPsocket  sock)

Definition at line 1072 of file network_worker.cpp.

Referenced by network::get_receive_stats(), and network::get_send_stats().

network::pending_statistics network_worker_pool::get_pending_stats ( )
TCPsocket network_worker_pool::get_received_data ( TCPsocket  sock,
config cfg,
network::bandwidth_in_ptr bandwidth_in 
)

Definition at line 880 of file network_worker.cpp.

References error(), itor, and config::swap().

Referenced by network::receive_data().

TCPsocket network_worker_pool::get_received_data ( std::vector< char > &  out)

Definition at line 914 of file network_worker.cpp.

bool network_worker_pool::is_locked ( const TCPsocket  sock)

Definition at line 1010 of file network_worker.cpp.

Referenced by network::receive_data().

static void network_worker_pool::queue_buffer ( TCPsocket  sock,
buffer queued_buf 
)
static

Definition at line 930 of file network_worker.cpp.

References i, and threading::condition::notify_one().

Referenced by queue_data(), queue_file(), and queue_raw_data().

size_t network_worker_pool::queue_data ( TCPsocket  sock,
const config buf,
const std::string packet_type 
)

Definition at line 958 of file network_worker.cpp.

References network::add_bandwidth_out(), DBG_NW, and queue_buffer().

Referenced by network::send_data().

void network_worker_pool::queue_file ( TCPsocket  sock,
const std::string filename 
)

Definition at line 951 of file network_worker.cpp.

References queue_buffer().

Referenced by network::send_file().

void network_worker_pool::queue_raw_data ( TCPsocket  sock,
const char *  buf,
int  len 
)

Definition at line 942 of file network_worker.cpp.

References queue_buffer().

Referenced by network::send_raw_data().

void network_worker_pool::receive_data ( TCPsocket  sock)

Function to asynchronously received data to the given socket.

Definition at line 866 of file network_worker.cpp.

References i, and threading::condition::notify_one().

Referenced by network::receive_data().

void network_worker_pool::set_raw_data_only ( )

Definition at line 856 of file network_worker.cpp.

Referenced by network::set_raw_data_only().

void network_worker_pool::set_use_system_sendfile ( bool  use)