![]() |
Nilorea Library
C utilities for networking, threading, graphics
|
#include <stdio.h>#include <stdlib.h>#include <string.h>#include <errno.h>#include <getopt.h>#include <signal.h>#include "nilorea/n_common.h"#include "nilorea/n_log.h"#include "nilorea/n_network.h"#include "nilorea/n_network_msg.h"#include "nilorea/n_thread_pool.h"
Include dependency graph for ex_accept_pool_client.c:Go to the source code of this file.
Data Structures | |
| struct | CLIENT_STATE |
| shared state for client threads More... | |
Macros | |
| #define | NETMSG_DATA 1 |
| type of data message | |
Functions | |
| static void * | client_worker_echo (void *ptr) |
| Echo mode: connect, send a message, receive echo, close. | |
| static void * | client_worker_fast (void *ptr) |
| Fast mode: connect and immediately close (measures pure accept throughput) | |
| int | main (int argc, char **argv) |
| static void | usage (void) |
Variables | |
| static int | client_echo_mode = 0 |
| struct CLIENT_STATE |
shared state for client threads
Definition at line 53 of file ex_accept_pool_client.c.
Collaboration diagram for CLIENT_STATE:| #define NETMSG_DATA 1 |
type of data message
Definition at line 48 of file ex_accept_pool_client.c.
|
static |
Echo mode: connect, send a message, receive echo, close.
| ptr | pointer to CLIENT_STATE |
Definition at line 96 of file ex_accept_pool_client.c.
References __n_assert, add_int_to_msg(), add_nstrptr_to_msg(), char_to_nstr(), create_msg(), delete_msg(), CLIENT_STATE::fail_count, free_nstr, CLIENT_STATE::host, CLIENT_STATE::lock, LOG_DEBUG, make_str_from_msg(), n_log, NETMSG_DATA, netw, netw_add_msg(), netw_close(), netw_connect(), netw_start_thr_engine(), netw_wait_msg(), NETWORK_IPALL, CLIENT_STATE::port, and CLIENT_STATE::success_count.
Referenced by main().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Fast mode: connect and immediately close (measures pure accept throughput)
| ptr | pointer to CLIENT_STATE |
Definition at line 71 of file ex_accept_pool_client.c.
References __n_assert, CLIENT_STATE::fail_count, CLIENT_STATE::host, CLIENT_STATE::lock, netw, netw_close(), netw_connect(), NETWORK_IPALL, CLIENT_STATE::port, and CLIENT_STATE::success_count.
Referenced by main().
Here is the call graph for this function:
Here is the caller graph for this function:| int main | ( | int | argc, |
| char ** | argv | ||
| ) |
Definition at line 154 of file ex_accept_pool_client.c.
References add_threaded_process(), client_echo_mode, client_worker_echo(), client_worker_fast(), destroy_threaded_pool(), CLIENT_STATE::fail_count, FreeNoLog, CLIENT_STATE::host, CLIENT_STATE::lock, LOG_DEBUG, LOG_ERR, LOG_INFO, log_level, LOG_NOTICE, n_log, new_thread_pool(), NORMAL_PROC, pool, CLIENT_STATE::port, port, set_log_level(), CLIENT_STATE::success_count, usage(), and wait_for_threaded_pool().
Here is the call graph for this function:
|
static |
Definition at line 142 of file ex_accept_pool_client.c.
Referenced by main(), main(), process_args(), process_args(), and process_args().
Here is the caller graph for this function:
|
static |
Definition at line 50 of file ex_accept_pool_client.c.
Referenced by main().