Macros | Typedefs
nettypes.h File Reference
#include "orconfig.h"

Go to the source code of this file.


#define tor_socket_t   int
#define TOR_SOCKET_T_FORMAT   "%d"
#define SOCKET_OK(s)   ((s) >= 0)
#define TOR_INVALID_SOCKET   (-1)


typedef int socklen_t

Detailed Description

Declarations for types used throughout the Tor networking system.

Definition in file nettypes.h.

Macro Definition Documentation


#define SOCKET_OK (   s)    ((s) >= 0)


#define TOR_INVALID_SOCKET   (-1)

Error/uninitialized value for a tor_socket_t.

Definition at line 41 of file nettypes.h.

Referenced by alert_sockets_create().

◆ tor_socket_t

#define tor_socket_t   int

Type used for a network socket.

Definition at line 36 of file nettypes.h.

Referenced by alert_sockets_create(), connection_handle_listener_read(), tor_accept_socket_with_extensions(), and tor_tls_release_socket().