Nilorea Library
C utilities for networking, threading, graphics
Loading...
Searching...
No Matches
ex_network.c File Reference
#include <stdio.h>
#include <errno.h>
#include "ex_network.h"
Include dependency graph for ex_network.c:

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, int *udp_mode)
void usage (void)

Variables

int ip_mode = 0
int mode = -1
 Network for managing conenctions.
int NB_ATTEMPTS = 3
NETWORK * netw = NULL
 Network for server mode, accepting incomming.
NETWORK * netw_server = NULL
static pthread_t netw_thr
int use_udp = 0

Macro Definition Documentation

◆ CLIENT

#define CLIENT   1
Examples
ex_network.c.

Definition at line 34 of file ex_network.c.

Referenced by main().

◆ SERVER

#define SERVER   0
Examples
ex_network.c.

Definition at line 33 of file ex_network.c.

Referenced by main().

Function Documentation

◆ main()

◆ process_args()

void process_args ( int argc,
char ** argv,
char ** address,
char ** server,
char ** port,
int * nb,
int * ip_version,
int * udp_mode )

Definition at line 59 of file ex_network.c.

References getoptret, ip_version, LOG_DEBUG, LOG_ERR, LOG_INFO, log_level, LOG_NOTICE, LOG_NULL, n_log, NETWORK_IPV4, NETWORK_IPV6, port, server, set_log_level(), and usage().

Here is the call graph for this function:

◆ usage()

void usage ( void )

Definition at line 46 of file ex_network.c.

Variable Documentation

◆ ip_mode

int ip_mode = 0
Examples
ex_network.c.

Definition at line 41 of file ex_network.c.

Referenced by main().

◆ mode

int mode = -1

Network for managing conenctions.

Definition at line 41 of file ex_network.c.

◆ NB_ATTEMPTS

int NB_ATTEMPTS = 3
Examples
ex_network.c.

Definition at line 36 of file ex_network.c.

Referenced by main().

◆ netw

NETWORK * netw = NULL

Network for server mode, accepting incomming.

Examples
ex_accept_pool_client.c, ex_clock_sync.c, ex_gui_network.c, ex_network.c, ex_network.h, ex_network_connect_abort.c, ex_network_proxy.c, ex_network_reactor.c, ex_network_ssl.c, ex_network_ssl_hardened.c, and ex_network_ssl_nonblock.c.

Definition at line 39 of file ex_network.c.

Referenced by _netw_capture_error(), _netw_crypto_setup_failed(), _netw_ssl_handshake_step(), _netw_start_nonblock_connect(), _netw_timed_connect(), _sse_read_byte(), _sse_write(), client_worker_echo(), client_worker_fast(), drive_connect(), drive_handshake(), io_full(), main(), main(), main(), manage_client(), n_netw_clear_errors(), n_netw_get_error(), n_netw_get_error_count(), n_reactor_close_netw_sync(), n_reactor_notify_send(), n_reactor_register(), n_reactor_unregister(), netw_accept_from_ex(), netw_add_msg(), netw_add_msg_ex(), netw_adopt_client_fd(), netw_bind_udp(), netw_close(), netw_connect(), netw_connect_check(), netw_connect_ex(), netw_connect_ex_to(), netw_connect_nonblock(), netw_connect_to(), netw_connect_udp(), netw_get_msg(), netw_get_queue_status(), netw_get_state(), netw_make_listening(), netw_new(), netw_pool_add(), netw_pool_broadcast(), netw_pool_netw_close(), netw_pool_remove(), netw_recv_func(), netw_send_func(), netw_send_ident(), netw_send_ping(), netw_send_position(), netw_send_quit(), netw_send_string_to(), netw_send_string_to_all(), netw_set(), netw_set_blocking(), netw_set_compression_mode(), netw_set_crypto(), netw_set_crypto_chain(), netw_set_crypto_chain_pem(), netw_set_crypto_pem(), netw_set_crypto_pem_ctx(), netw_set_user_id(), netw_setsockopt(), netw_ssl_connect(), netw_ssl_connect_client(), netw_ssl_connect_client_to(), netw_ssl_do_handshake(), netw_ssl_get_alpn(), netw_ssl_get_sni(), netw_ssl_get_verify_result(), netw_ssl_handshake_once(), netw_ssl_server_handshake(), netw_ssl_server_handshake_ex(), netw_ssl_server_handshake_once(), netw_ssl_set_alpn(), netw_ssl_set_ca(), netw_ssl_set_ciphers(), netw_ssl_set_client_cert(), netw_ssl_set_verify(), netw_ssl_set_versions(), netw_ssl_start_client(), netw_start_thr_engine(), netw_stop_thr_engine(), netw_udp_recvfrom(), netw_udp_sendto(), netw_wait_close(), netw_wait_close_timed(), netw_wait_msg(), poll_network_msgs(), recv_data(), recv_data_once(), recv_ssl_data(), recv_ssl_data_once(), recv_udp_data(), run_client(), run_client(), run_server(), send_data(), send_data_once(), send_net_datas(), send_ssl_data(), send_ssl_data_once(), send_udp_data(), and userlist_add_user().

◆ netw_server

NETWORK* netw_server = NULL

Definition at line 38 of file ex_network.c.

◆ netw_thr

pthread_t netw_thr
static
Examples
ex_network.c.

Definition at line 44 of file ex_network.c.

Referenced by main().

◆ use_udp

int use_udp = 0
Examples
ex_network.c.

Definition at line 42 of file ex_network.c.

Referenced by main().