GNUnet  0.11.x
Data Fields
GNUNET_CONNECTION_Handle Struct Reference

handle for a network connection More...

Collaboration diagram for GNUNET_CONNECTION_Handle:
[legend]

Data Fields

const struct GNUNET_CONFIGURATION_Handlecfg
 Configuration to use. More...
 
struct AddressProbeap_head
 Linked list of sockets we are currently trying out (during connect). More...
 
struct AddressProbeap_tail
 Linked list of sockets we are currently trying out (during connect). More...
 
struct sockaddr * addr
 Network address of the other end-point, may be NULL. More...
 
char * hostname
 Pointer to the hostname if connection was created using DNS lookup, otherwise NULL. More...
 
struct GNUNET_NETWORK_Handlesock
 Underlying OS's socket, set to NULL after fatal errors. More...
 
GNUNET_CONNECTION_Receiver receiver
 Function to call on data received, NULL if no receive is pending. More...
 
void * receiver_cls
 Closure for receiver. More...
 
char * write_buffer
 Pointer to our write buffer. More...
 
size_t write_buffer_size
 Current size of our write_buffer. More...
 
size_t write_buffer_off
 Current write-offset in write_buffer (where would we write next). More...
 
size_t write_buffer_pos
 Current read-offset in write_buffer (how many bytes have already been sent). More...
 
socklen_t addrlen
 Length of addr. More...
 
struct GNUNET_SCHEDULER_Taskread_task
 Read task that we may need to wait for. More...
 
struct GNUNET_SCHEDULER_Taskwrite_task
 Write task that we may need to wait for. More...
 
struct GNUNET_RESOLVER_RequestHandledns_active
 Handle to a pending DNS lookup request. More...
 
struct GNUNET_CONNECTION_TransmitHandle nth
 The handle we return for GNUNET_CONNECTION_notify_transmit_ready(). More...
 
struct GNUNET_TIME_Absolute receive_timeout
 Timeout for receiving (in absolute time). More...
 
size_t max
 Maximum number of bytes to read (for receiving). More...
 
uint16_t port
 Port to connect to. More...
 
int8_t persist
 When shutdown, do not ever actually close the socket, but free resources. More...
 
int8_t destroy_later
 Usually 0. More...
 
struct GNUNET_CONNECTION_Handleproxy_handshake
 Handle to subsequent connection after proxy handshake completes,. More...
 

Detailed Description

handle for a network connection

Definition at line 137 of file tcp_connection_legacy.c.

Field Documentation

◆ cfg

const struct GNUNET_CONFIGURATION_Handle* GNUNET_CONNECTION_Handle::cfg

◆ ap_head

struct AddressProbe* GNUNET_CONNECTION_Handle::ap_head

◆ ap_tail

struct AddressProbe* GNUNET_CONNECTION_Handle::ap_tail

Linked list of sockets we are currently trying out (during connect).

Definition at line 154 of file tcp_connection_legacy.c.

Referenced by connect_fail_continuation(), connect_probe_continuation(), GNUNET_CONNECTION_destroy(), and try_connect_using_address().

◆ addr

struct sockaddr* GNUNET_CONNECTION_Handle::addr

◆ hostname

char* GNUNET_CONNECTION_Handle::hostname

◆ sock

struct GNUNET_NETWORK_Handle* GNUNET_CONNECTION_Handle::sock

◆ receiver

GNUNET_CONNECTION_Receiver GNUNET_CONNECTION_Handle::receiver

◆ receiver_cls

void* GNUNET_CONNECTION_Handle::receiver_cls

◆ write_buffer

char* GNUNET_CONNECTION_Handle::write_buffer

◆ write_buffer_size

size_t GNUNET_CONNECTION_Handle::write_buffer_size

◆ write_buffer_off

size_t GNUNET_CONNECTION_Handle::write_buffer_off

Current write-offset in write_buffer (where would we write next).

Definition at line 196 of file tcp_connection_legacy.c.

Referenced by GNUNET_CONNECTION_destroy(), GNUNET_CONNECTION_notify_transmit_ready(), process_notify(), and transmit_ready().

◆ write_buffer_pos

size_t GNUNET_CONNECTION_Handle::write_buffer_pos

Current read-offset in write_buffer (how many bytes have already been sent).

Definition at line 202 of file tcp_connection_legacy.c.

Referenced by GNUNET_CONNECTION_notify_transmit_ready(), process_notify(), and transmit_ready().

◆ addrlen

socklen_t GNUNET_CONNECTION_Handle::addrlen

◆ read_task

struct GNUNET_SCHEDULER_Task* GNUNET_CONNECTION_Handle::read_task

◆ write_task

struct GNUNET_SCHEDULER_Task* GNUNET_CONNECTION_Handle::write_task

◆ dns_active

struct GNUNET_RESOLVER_RequestHandle* GNUNET_CONNECTION_Handle::dns_active

◆ nth

struct GNUNET_CONNECTION_TransmitHandle GNUNET_CONNECTION_Handle::nth

◆ receive_timeout

struct GNUNET_TIME_Absolute GNUNET_CONNECTION_Handle::receive_timeout

Timeout for receiving (in absolute time).

Definition at line 232 of file tcp_connection_legacy.c.

Referenced by connect_success_continuation(), GNUNET_CONNECTION_receive(), receive_ready(), and try_connect_using_address().

◆ max

size_t GNUNET_CONNECTION_Handle::max

Maximum number of bytes to read (for receiving).

Definition at line 237 of file tcp_connection_legacy.c.

Referenced by GNUNET_CONNECTION_receive(), and receive_ready().

◆ port

uint16_t GNUNET_CONNECTION_Handle::port

◆ persist

int8_t GNUNET_CONNECTION_Handle::persist

When shutdown, do not ever actually close the socket, but free resources.

Only should ever be set if using program termination as a signal (because only then will the leaked socket be freed!)

Definition at line 250 of file tcp_connection_legacy.c.

Referenced by GNUNET_CONNECTION_destroy(), and GNUNET_CONNECTION_persist_().

◆ destroy_later

int8_t GNUNET_CONNECTION_Handle::destroy_later

Usually 0.

Set to 1 if this handle is in use, and should GNUNET_CONNECTION_destroy() be called right now, the action needs to be deferred by setting it to -1.

Definition at line 257 of file tcp_connection_legacy.c.

Referenced by connect_fail_continuation(), GNUNET_CONNECTION_check(), and GNUNET_CONNECTION_destroy().

◆ proxy_handshake

struct GNUNET_CONNECTION_Handle* GNUNET_CONNECTION_Handle::proxy_handshake

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