GNUnet  0.11.x
Data Fields
GNUNET_SERVER_Client Struct Reference

handle for a client of the server More...

Collaboration diagram for GNUNET_SERVER_Client:
[legend]

Data Fields

struct GNUNET_SERVER_Clientnext
 This is a doubly linked list. More...
 
struct GNUNET_SERVER_Clientprev
 This is a doubly linked list. More...
 
void * mst
 Processing of incoming data. More...
 
struct GNUNET_SERVER_Handleserver
 Server that this client belongs to. More...
 
struct GNUNET_CONNECTION_Handleconnection
 Client closure for callbacks. More...
 
void * user_context
 User context value, manipulated using 'GNUNET_SERVER_client_{get/set}_user_context' functions. More...
 
struct GNUNET_SCHEDULER_Taskrestart_task
 ID of task used to restart processing. More...
 
struct GNUNET_SCHEDULER_Taskwarn_task
 Task that warns about missing calls to GNUNET_SERVER_receive_done. More...
 
struct GNUNET_TIME_Absolute warn_start
 Time when the warn task was started. More...
 
struct GNUNET_TIME_Absolute last_activity
 Last activity on this socket (used to time it out if reference_count == 0). More...
 
struct GNUNET_SERVER_TransmitHandle th
 Transmission handle we return for this client from GNUNET_SERVER_notify_transmit_ready. More...
 
struct GNUNET_TIME_Relative idle_timeout
 After how long should an idle connection time out (on write). More...
 
unsigned int reference_count
 Number of external entities with a reference to this client object. More...
 
unsigned int suspended
 Was processing if incoming messages suspended while we were still processing data already received? This is a counter saying how often processing was suspended (once per handler invoked). More...
 
size_t user_context_size
 Last size given when user context was initialized; used for sanity check. More...
 
int in_process_client_buffer
 Are we currently in the "process_client_buffer" function (and will hence restart the receive job on exit if suspended == 0 once we are done?). More...
 
int shutdown_now
 We're about to close down this client. More...
 
int receive_pending
 Are we currently trying to receive? (GNUNET_YES if we are, GNUNET_NO if we are not, GNUNET_SYSERR if data is already available in MST). More...
 
int persist
 Persist the file handle for this client no matter what happens, force the OS to close once the process actually dies. More...
 
int is_monitor
 Is this client a 'monitor' client that should not be counted when deciding on destroying the server during soft shutdown? (see also GNUNET_SERVICE_start) More...
 
uint16_t warn_type
 Type of last message processed (for warn_no_receive_done). More...
 

Detailed Description

handle for a client of the server

Definition at line 211 of file tcp_server_legacy.c.

Field Documentation

◆ next

struct GNUNET_SERVER_Client* GNUNET_SERVER_Client::next

This is a doubly linked list.

Definition at line 216 of file tcp_server_legacy.c.

Referenced by GNUNET_SERVER_connect_notify(), and test_monitor_clients().

◆ prev

struct GNUNET_SERVER_Client* GNUNET_SERVER_Client::prev

This is a doubly linked list.

Definition at line 221 of file tcp_server_legacy.c.

◆ mst

void* GNUNET_SERVER_Client::mst

Processing of incoming data.

Definition at line 226 of file tcp_server_legacy.c.

Referenced by GNUNET_SERVER_client_disconnect(), GNUNET_SERVER_connect_socket(), process_incoming(), and process_mst().

◆ server

struct GNUNET_SERVER_Handle* GNUNET_SERVER_Client::server

◆ connection

struct GNUNET_CONNECTION_Handle* GNUNET_SERVER_Client::connection

◆ user_context

void* GNUNET_SERVER_Client::user_context

User context value, manipulated using 'GNUNET_SERVER_client_{get/set}_user_context' functions.

Definition at line 242 of file tcp_server_legacy.c.

Referenced by GNUNET_SERVER_client_get_user_context_(), and GNUNET_SERVER_client_set_user_context_().

◆ restart_task

struct GNUNET_SCHEDULER_Task* GNUNET_SERVER_Client::restart_task

ID of task used to restart processing.

Definition at line 247 of file tcp_server_legacy.c.

Referenced by GNUNET_SERVER_client_disconnect(), GNUNET_SERVER_receive_done(), and restart_processing().

◆ warn_task

struct GNUNET_SCHEDULER_Task* GNUNET_SERVER_Client::warn_task

◆ warn_start

struct GNUNET_TIME_Absolute GNUNET_SERVER_Client::warn_start

Time when the warn task was started.

Definition at line 257 of file tcp_server_legacy.c.

Referenced by GNUNET_SERVER_inject(), and warn_no_receive_done().

◆ last_activity

struct GNUNET_TIME_Absolute GNUNET_SERVER_Client::last_activity

Last activity on this socket (used to time it out if reference_count == 0).

Definition at line 263 of file tcp_server_legacy.c.

Referenced by GNUNET_SERVER_connect_socket(), process_incoming(), and transmit_ready_callback_wrapper().

◆ th

struct GNUNET_SERVER_TransmitHandle GNUNET_SERVER_Client::th

Transmission handle we return for this client from GNUNET_SERVER_notify_transmit_ready.

Definition at line 269 of file tcp_server_legacy.c.

Referenced by GNUNET_SERVER_client_disconnect(), GNUNET_SERVER_notify_transmit_ready(), and transmit_ready_callback_wrapper().

◆ idle_timeout

struct GNUNET_TIME_Relative GNUNET_SERVER_Client::idle_timeout

After how long should an idle connection time out (on write).

Definition at line 275 of file tcp_server_legacy.c.

Referenced by GNUNET_SERVER_client_set_timeout(), GNUNET_SERVER_connect_socket(), process_incoming(), process_mst(), and restart_processing().

◆ reference_count

unsigned int GNUNET_SERVER_Client::reference_count

Number of external entities with a reference to this client object.

Definition at line 281 of file tcp_server_legacy.c.

Referenced by GNUNET_SERVER_client_disconnect(), GNUNET_SERVER_client_drop(), GNUNET_SERVER_client_keep(), and GNUNET_SERVER_receive_done().

◆ suspended

unsigned int GNUNET_SERVER_Client::suspended

Was processing if incoming messages suspended while we were still processing data already received? This is a counter saying how often processing was suspended (once per handler invoked).

Definition at line 289 of file tcp_server_legacy.c.

Referenced by GNUNET_SERVER_inject(), GNUNET_SERVER_receive_done(), and process_mst().

◆ user_context_size

size_t GNUNET_SERVER_Client::user_context_size

Last size given when user context was initialized; used for sanity check.

Definition at line 295 of file tcp_server_legacy.c.

Referenced by GNUNET_SERVER_client_get_user_context_(), and GNUNET_SERVER_client_set_user_context_().

◆ in_process_client_buffer

int GNUNET_SERVER_Client::in_process_client_buffer

Are we currently in the "process_client_buffer" function (and will hence restart the receive job on exit if suspended == 0 once we are done?).

If this is set, then "receive_done" will essentially only decrement suspended; if this is not set, then "receive_done" may need to restart the receive process (either from the side-buffer or via select/recv).

Definition at line 305 of file tcp_server_legacy.c.

Referenced by client_message_tokenizer_callback(), GNUNET_SERVER_client_disconnect(), and GNUNET_SERVER_receive_done().

◆ shutdown_now

int GNUNET_SERVER_Client::shutdown_now

◆ receive_pending

int GNUNET_SERVER_Client::receive_pending

Are we currently trying to receive? (GNUNET_YES if we are, GNUNET_NO if we are not, GNUNET_SYSERR if data is already available in MST).

Definition at line 317 of file tcp_server_legacy.c.

Referenced by GNUNET_SERVER_client_disconnect(), GNUNET_SERVER_connect_socket(), process_incoming(), process_mst(), and restart_processing().

◆ persist

int GNUNET_SERVER_Client::persist

Persist the file handle for this client no matter what happens, force the OS to close once the process actually dies.

Should only be used in special cases!

Definition at line 324 of file tcp_server_legacy.c.

Referenced by GNUNET_SERVER_client_disconnect(), and GNUNET_SERVER_client_persist_().

◆ is_monitor

int GNUNET_SERVER_Client::is_monitor

Is this client a 'monitor' client that should not be counted when deciding on destroying the server during soft shutdown? (see also GNUNET_SERVICE_start)

Definition at line 331 of file tcp_server_legacy.c.

Referenced by GNUNET_SERVER_client_mark_monitor(), and test_monitor_clients().

◆ warn_type

uint16_t GNUNET_SERVER_Client::warn_type

Type of last message processed (for warn_no_receive_done).

Definition at line 336 of file tcp_server_legacy.c.

Referenced by GNUNET_SERVER_inject(), and warn_no_receive_done().


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