Nilorea Library

- Main Page
- Modules
- Data Structures
- Files

- Data Structures
- Data Structure Index
- Data Fields

All Data Structures Files Functions Variables Typedefs Macros Groups
Data Fields
NETWORK Struct Reference
NETWORK: connect, accept, send and recv wrappers. Network Queue, thread-safe add/get message

`#include <n_network.h>`

Collaboration diagram for NETWORK:
[legend]

## Data Fields

int | nb_pending
int | mode
int | state
int | threaded_engine_status
N_SOCKET | link
LIST * | send_buf
LIST * | recv_buf
pthread_t | send_thr
pthread_t | recv_thr
pthread_mutex_t | sendbolt
pthread_mutex_t | recvbolt
pthread_mutex_t | eventbolt

## Detailed Description

Structure of a NETWORK

Definition at line 104 of file n_network.h.

## Field Documentation

pthread_mutex_t eventbolt

mutex for threaded access of state event

Definition at line 133 of file n_network.h.

N_SOCKET link

networking socket

Definition at line 116 of file n_network.h.

int mode

NETWORK mode , 1 listening, 0 connecting

Definition at line 107 of file n_network.h.

int nb_pending

Nb pending connection,if listening

Definition at line 107 of file n_network.h.

LIST* recv_buf

reveicing buffer (for incomming usage)

Definition at line 121 of file n_network.h.

pthread_t recv_thr

receiving thread

Definition at line 126 of file n_network.h.

pthread_mutex_t recvbolt

mutex for threaded access of recv buf

Definition at line 131 of file n_network.h.

LIST* send_buf

sending buffer (for outgoing queuing )

Definition at line 119 of file n_network.h.

pthread_t send_thr

sending thread

Definition at line 124 of file n_network.h.

pthread_mutex_t sendbolt

mutex for threaded access of send_buf

Definition at line 129 of file n_network.h.

int state

state of the connection , NETW_RUN, NETW_PAUSE, NETW_QUIT, NETW_STOP , NETW_ERR

Definition at line 107 of file n_network.h.

int threaded_engine_status

Threaded network engine state for this network. NETW_THR_ENGINE_STARTED or NETW_THR_ENGINE_STOPPED

Definition at line 107 of file n_network.h.

The documentation for this struct was generated from the following file:

- include/n_network.h