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)

Macro: true iff 's' is a possible value for a valid initialized socket.

Definition at line 39 of file nettypes.h.


#define TOR_INVALID_SOCKET   (-1)

Error/uninitialized value for a tor_socket_t.

Definition at line 41 of file nettypes.h.

◆ tor_socket_t

#define tor_socket_t   int

Type used for a network socket.

Definition at line 36 of file nettypes.h.