5 Struct NETW_ACCEPT_POOL
gullradriel edited this page 2026-10-09 00:55:18 +02:00

NETW_ACCEPT_POOL

Module: ACCEPT_POOL: parallel accept pool for high-performance connection handling

Structure of a parallel accept pool.

#include "n_network_accept_pool.h"

Public Attributes

Name
void * user_data
opaque user data passed to callback
pthread_mutex_t stats_lock
mutex protecting stats
NETW_ACCEPT_POOL_STATS stats
pool statistics
uint32_t state
atomic pool state
NETWORK * server
listening socket (not owned, caller must keep alive)
size_t nb_accept_threads
number of accept threads
netw_accept_callback_t callback
user callback invoked on each accepted connection
int accept_timeout
accept timeout in milliseconds (passed to netw_accept_from_ex blocking param).
pthread_t * accept_threads
array of pthread ids

Public Attributes Documentation

variable user_data

void * user_data;

opaque user data passed to callback

variable stats_lock

pthread_mutex_t stats_lock;

mutex protecting stats

variable stats

NETW_ACCEPT_POOL_STATS stats;

pool statistics

variable state

uint32_t state;

atomic pool state

variable server

NETWORK * server;

listening socket (not owned, caller must keep alive)

variable nb_accept_threads

size_t nb_accept_threads;

number of accept threads

variable callback

netw_accept_callback_t callback;

user callback invoked on each accepted connection

variable accept_timeout

int accept_timeout;

accept timeout in milliseconds (passed to netw_accept_from_ex blocking param).

0 = blocking, -1 = non-blocking, >0 = timeout in msec

variable accept_threads

pthread_t * accept_threads;

array of pthread ids