handle for a network connection More...
Data Fields | |
const struct GNUNET_CONFIGURATION_Handle * | cfg |
Configuration to use. More... | |
struct AddressProbe * | ap_head |
Linked list of sockets we are currently trying out (during connect). More... | |
struct AddressProbe * | ap_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_Handle * | sock |
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_Task * | read_task |
Read task that we may need to wait for. More... | |
struct GNUNET_SCHEDULER_Task * | write_task |
Write task that we may need to wait for. More... | |
struct GNUNET_RESOLVER_RequestHandle * | dns_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_Handle * | proxy_handshake |
Handle to subsequent connection after proxy handshake completes,. More... | |
handle for a network connection
Definition at line 137 of file tcp_connection_legacy.c.
const struct GNUNET_CONFIGURATION_Handle* GNUNET_CONNECTION_Handle::cfg |
Configuration to use.
Definition at line 142 of file tcp_connection_legacy.c.
Referenced by gnunet_testing.Peer::__del__(), gnunet_testing.Peer::get_statistics_value(), GNUNET_CONNECTION_create_from_connect(), GNUNET_CONNECTION_create_from_connect_to_unixpath(), gnunet_testing.Peer::start(), and gnunet_testing.Peer::stop().
struct AddressProbe* GNUNET_CONNECTION_Handle::ap_head |
Linked list of sockets we are currently trying out (during connect).
Definition at line 148 of file tcp_connection_legacy.c.
Referenced by connect_fail_continuation(), connect_probe_continuation(), GNUNET_CONNECTION_check(), GNUNET_CONNECTION_destroy(), GNUNET_CONNECTION_notify_transmit_ready(), GNUNET_CONNECTION_receive(), and try_connect_using_address().
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().
struct sockaddr* GNUNET_CONNECTION_Handle::addr |
Network address of the other end-point, may be NULL.
Definition at line 159 of file tcp_connection_legacy.c.
Referenced by connect_probe_continuation(), connect_success_continuation(), GNUNET_CONNECTION_connect_socket(), GNUNET_CONNECTION_create_from_accept(), GNUNET_CONNECTION_create_from_connect_to_unixpath(), GNUNET_CONNECTION_destroy(), GNUNET_CONNECTION_get_address(), receive_ready(), signal_receive_error(), transmit_ready(), transmit_timeout(), and try_connect_using_address().
char* GNUNET_CONNECTION_Handle::hostname |
Pointer to the hostname if connection was created using DNS lookup, otherwise NULL.
Definition at line 165 of file tcp_connection_legacy.c.
Referenced by connect_error(), connect_fail_continuation(), GNUNET_CONNECTION_create_from_connect(), GNUNET_CONNECTION_create_from_connect_to_unixpath(), GNUNET_CONNECTION_destroy(), transmit_timeout(), and try_connect_using_address().
struct GNUNET_NETWORK_Handle* GNUNET_CONNECTION_Handle::sock |
Underlying OS's socket, set to NULL after fatal errors.
Definition at line 170 of file tcp_connection_legacy.c.
Referenced by connect_fail_continuation(), connect_probe_continuation(), connect_success_continuation(), GNUNET_CONNECTION_acivate_proxied(), GNUNET_CONNECTION_check(), GNUNET_CONNECTION_create_from_accept(), GNUNET_CONNECTION_create_from_connect_to_unixpath(), GNUNET_CONNECTION_create_from_existing(), GNUNET_CONNECTION_destroy(), GNUNET_CONNECTION_disable_corking(), GNUNET_CONNECTION_notify_transmit_ready(), GNUNET_CONNECTION_receive(), process_listen_socket(), receive_ready(), signal_transmit_error(), tcp_plugin_get_network(), transmit_ready(), and try_connect_using_address().
GNUNET_CONNECTION_Receiver GNUNET_CONNECTION_Handle::receiver |
Function to call on data received, NULL if no receive is pending.
Definition at line 175 of file tcp_connection_legacy.c.
Referenced by connect_fail_continuation(), connect_success_continuation(), GNUNET_CONNECTION_destroy(), GNUNET_CONNECTION_receive(), GNUNET_CONNECTION_receive_cancel(), receive_ready(), signal_receive_error(), signal_receive_timeout(), and try_connect_using_address().
void* GNUNET_CONNECTION_Handle::receiver_cls |
Closure for receiver.
Definition at line 180 of file tcp_connection_legacy.c.
Referenced by GNUNET_CONNECTION_receive(), GNUNET_CONNECTION_receive_cancel(), receive_ready(), signal_receive_error(), and signal_receive_timeout().
char* GNUNET_CONNECTION_Handle::write_buffer |
Pointer to our write buffer.
Definition at line 185 of file tcp_connection_legacy.c.
Referenced by GNUNET_CONNECTION_create_from_accept(), GNUNET_CONNECTION_create_from_connect(), GNUNET_CONNECTION_create_from_connect_to_unixpath(), GNUNET_CONNECTION_create_from_existing(), GNUNET_CONNECTION_destroy(), process_notify(), and transmit_ready().
size_t GNUNET_CONNECTION_Handle::write_buffer_size |
Current size of our write_buffer.
Definition at line 190 of file tcp_connection_legacy.c.
Referenced by GNUNET_CONNECTION_create_from_accept(), GNUNET_CONNECTION_create_from_connect(), GNUNET_CONNECTION_create_from_connect_to_unixpath(), GNUNET_CONNECTION_create_from_existing(), GNUNET_CONNECTION_notify_transmit_ready(), process_notify(), and transmit_ready().
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().
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().
socklen_t GNUNET_CONNECTION_Handle::addrlen |
Length of addr.
Definition at line 207 of file tcp_connection_legacy.c.
Referenced by connect_probe_continuation(), connect_success_continuation(), GNUNET_CONNECTION_connect_socket(), GNUNET_CONNECTION_create_from_accept(), GNUNET_CONNECTION_create_from_connect_to_unixpath(), GNUNET_CONNECTION_get_address(), receive_ready(), signal_receive_error(), transmit_ready(), and transmit_timeout().
struct GNUNET_SCHEDULER_Task* GNUNET_CONNECTION_Handle::read_task |
Read task that we may need to wait for.
Definition at line 212 of file tcp_connection_legacy.c.
Referenced by connect_success_continuation(), GNUNET_CONNECTION_destroy(), GNUNET_CONNECTION_receive(), GNUNET_CONNECTION_receive_cancel(), receive_ready(), and signal_transmit_error().
struct GNUNET_SCHEDULER_Task* GNUNET_CONNECTION_Handle::write_task |
Write task that we may need to wait for.
Definition at line 217 of file tcp_connection_legacy.c.
Referenced by connect_error(), connect_fail_continuation(), connect_success_continuation(), GNUNET_CONNECTION_destroy(), GNUNET_CONNECTION_notify_transmit_ready(), GNUNET_CONNECTION_notify_transmit_ready_cancel(), process_notify(), signal_transmit_error(), and transmit_ready().
struct GNUNET_RESOLVER_RequestHandle* GNUNET_CONNECTION_Handle::dns_active |
Handle to a pending DNS lookup request.
Definition at line 222 of file tcp_connection_legacy.c.
Referenced by connect_fail_continuation(), connect_probe_continuation(), GNUNET_CONNECTION_check(), GNUNET_CONNECTION_create_from_connect(), GNUNET_CONNECTION_destroy(), GNUNET_CONNECTION_notify_transmit_ready(), GNUNET_CONNECTION_receive(), and try_connect_using_address().
struct GNUNET_CONNECTION_TransmitHandle GNUNET_CONNECTION_Handle::nth |
The handle we return for GNUNET_CONNECTION_notify_transmit_ready().
Definition at line 222 of file tcp_connection_legacy.c.
Referenced by connect_error(), connect_fail_continuation(), connect_success_continuation(), GNUNET_CONNECTION_destroy(), GNUNET_CONNECTION_notify_transmit_ready(), process_notify(), signal_transmit_error(), transmit_ready(), transmit_timeout(), and try_connect_using_address().
struct GNUNET_TIME_Absolute GNUNET_CONNECTION_Handle::receive_timeout |
Timeout for receiving (in absolute time).
Definition at line 222 of file tcp_connection_legacy.c.
Referenced by connect_success_continuation(), GNUNET_CONNECTION_receive(), receive_ready(), and try_connect_using_address().
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().
uint16_t GNUNET_CONNECTION_Handle::port |
Port to connect to.
Definition at line 242 of file tcp_connection_legacy.c.
Referenced by connect_error(), connect_fail_continuation(), GNUNET_CONNECTION_create_from_connect(), GNUNET_CONNECTION_create_from_connect_to_unixpath(), transmit_timeout(), and try_connect_using_address().
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_().
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().
struct GNUNET_CONNECTION_Handle* GNUNET_CONNECTION_Handle::proxy_handshake |
Handle to subsequent connection after proxy handshake completes,.
Definition at line 262 of file tcp_connection_legacy.c.
Referenced by connect_fail_continuation(), connect_probe_continuation(), GNUNET_CONNECTION_acivate_proxied(), GNUNET_CONNECTION_check(), GNUNET_CONNECTION_create_proxied_from_handshake(), GNUNET_CONNECTION_destroy(), GNUNET_CONNECTION_notify_transmit_ready(), GNUNET_CONNECTION_receive(), and try_connect_using_address().