Tor  0.4.6.0-alpha-dev
Data Fields
alert_sockets_t Struct Reference

#include <alertsock.h>

Data Fields

tor_socket_t read_fd
 
tor_socket_t write_fd
 
int(* alert_fn )(tor_socket_t write_fd)
 
int(* drain_fn )(tor_socket_t read_fd)
 

Detailed Description

Helper type used to manage waking up the main thread while it's in the libevent main loop. Used by the work queue code.

Definition at line 21 of file alertsock.h.

Field Documentation

◆ alert_fn

int(* alert_fn) (tor_socket_t write_fd)

Function to alert the main thread

Definition at line 30 of file alertsock.h.

Referenced by alert_sockets_close().

◆ drain_fn

int(* drain_fn) (tor_socket_t read_fd)

Function to make the main thread no longer alerted.

Definition at line 32 of file alertsock.h.

◆ read_fd

tor_socket_t read_fd

Socket that the main thread should listen for EV_READ events on. Note that this socket may be a regular fd on a non-Windows platform.

Definition at line 26 of file alertsock.h.

Referenced by alert_sockets_close().

◆ write_fd

tor_socket_t write_fd

Socket to use when alerting the main thread.

Definition at line 28 of file alertsock.h.

Referenced by alert_sockets_close().


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