Nilorea Library
C utilities for networking, threading, graphics
|
Go to the source code of this file.
Macros | |
#define | CLIENT 1 |
#define | SERVER 0 |
Functions | |
int | main (int argc, char **argv) |
void | process_args (int argc, char **argv, char **address, char **server, char **port, int *nb, int *ip_version) |
void | usage (void) |
Variables | |
int | ip_version = 0 |
int | mode = -1 |
Network for managing conenctions. More... | |
int | NB_ATTEMPTS = 3 |
NETWORK * | netw = NULL |
Network for server mode, accepting incomming. More... | |
static pthread_t | netw_thr |
NETWORK * | server = NULL |
#define CLIENT 1 |
Definition at line 13 of file ex_network.c.
#define SERVER 0 |
Definition at line 12 of file ex_network.c.
int main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 162 of file ex_network.c.
References _str, add_threaded_process(), char_to_nstr(), CLIENT, destroy_threaded_pool(), DIRECT_PROC, free_nstr, FreeNoLog, get_net_datas(), ip_version, LOG_DEBUG, LOG_ERR, LOG_INFO, LOG_NOTICE, manage_client(), mode, n_log, NB_ATTEMPTS, netw, netw_accept_from(), netw_accept_from_ex(), netw_close(), netw_connect(), netw_make_listening(), netw_start_thr_engine(), netw_thr, netw_wait_msg(), new_thread_pool(), process_args(), refresh_thread_pool(), send_net_datas(), SERVER, server, set_log_level(), thread_pool, u_sleep(), and wait_for_threaded_pool().
void process_args | ( | int | argc, |
char ** | argv, | ||
char ** | address, | ||
char ** | server, | ||
char ** | port, | ||
int * | nb, | ||
int * | ip_version | ||
) |
Definition at line 35 of file ex_network.c.
References getoptret, LOG_DEBUG, LOG_ERR, LOG_INFO, log_level, LOG_NOTICE, LOG_NULL, n_log, NETWORK_IPV4, NETWORK_IPV6, set_log_level(), and usage().
Referenced by main().
void usage | ( | void | ) |
Definition at line 24 of file ex_network.c.
Referenced by process_args().
int ip_version = 0 |
int mode = -1 |
Network for managing conenctions.
Definition at line 20 of file ex_network.c.
Referenced by add_particle(), add_particle_ex(), add_threaded_process(), draw_map(), draw_particle(), ht_get_completion_list(), ht_get_node_ex(), ht_get_ptr_ex(), ht_get_table_collision_percentage(), ht_put_ptr_ex(), ht_remove_ex(), main(), n_kafka_load_config(), n_kafka_new(), new_ht(), new_ht_trie(), scan_dir_ex(), and userlist_add_msg_to_ex().
int NB_ATTEMPTS = 3 |
NETWORK * netw = NULL |
Network for server mode, accepting incomming.
Definition at line 18 of file ex_network.c.
Referenced by main(), manage_client(), send_net_datas(), userlist_add_msg_to_ex(), userlist_add_user(), userlist_del_user(), userlist_new(), userlist_send_waiting_msgs(), and userlist_user_send_waiting_msgs().
|
static |
NETWORK* server = NULL |