Project Alice
Loading...
Searching...
No Matches
network Namespace Reference

Classes

struct  client_data
 
struct  client_handshake_data
 
struct  local_addresses
 
struct  network_state
 
class  port_forwarder
 
struct  server_handshake_data
 

Typedefs

typedef int socket_t
 

Functions

std::string get_last_error_msg ()
 
void init (sys::state &state)
 
void write_network_save (sys::state &state)
 
void broadcast_save_to_clients (sys::state &state, command::payload &c, uint8_t const *buffer, uint32_t length, sys::checksum_key const &k)
 
void broadcast_to_clients (sys::state &state, command::payload &c)
 
void send_and_receive_commands (sys::state &state)
 
void finish (sys::state &state, bool notify_host)
 
void ban_player (sys::state &state, client_data &client)
 
void kick_player (sys::state &state, client_data &client)
 
void switch_player (sys::state &state, dcon::nation_id new_n, dcon::nation_id old_n)
 

Variables

constexpr short default_server_port = 1984
 

Typedef Documentation

◆ socket_t

typedef int network::socket_t

Definition at line 31 of file network.hpp.

Function Documentation

◆ ban_player()

void network::ban_player ( sys::state state,
client_data client 
)

Definition at line 1131 of file network.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ broadcast_save_to_clients()

void network::broadcast_save_to_clients ( sys::state state,
command::payload c,
uint8_t const *  buffer,
uint32_t  length,
sys::checksum_key const &  k 
)

Definition at line 775 of file network.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ broadcast_to_clients()

void network::broadcast_to_clients ( sys::state state,
command::payload c 
)

Definition at line 798 of file network.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ finish()

void network::finish ( sys::state state,
bool  notify_host 
)

Definition at line 1090 of file network.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_last_error_msg()

std::string network::get_last_error_msg ( )

Definition at line 271 of file network.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ init()

void network::init ( sys::state state)

Definition at line 497 of file network.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ kick_player()

void network::kick_player ( sys::state state,
client_data client 
)

Definition at line 1145 of file network.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ send_and_receive_commands()

void network::send_and_receive_commands ( sys::state state)

Definition at line 853 of file network.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ switch_player()

void network::switch_player ( sys::state state,
dcon::nation_id  new_n,
dcon::nation_id  old_n 
)

Definition at line 1152 of file network.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ write_network_save()

void network::write_network_save ( sys::state state)

Definition at line 759 of file network.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ default_server_port

constexpr short network::default_server_port = 1984
inlineconstexpr

Definition at line 26 of file network.hpp.