diff options
author | Peter Retzlaff <peter.retzlaff@student.hpi.uni-potsdam.de> | 2013-05-27 19:16:43 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2013-08-02 09:35:24 -0400 |
commit | ebd4ab1506517b32ee3bd5bd1597b4373aa56ee7 (patch) | |
tree | 1f77b8d30fe92462837693b821bb9eb836720591 /src/common/compat.h | |
parent | 83a859e24ced67663ea46f3bd05d53b29f6797c0 (diff) | |
download | tor-ebd4ab1506517b32ee3bd5bd1597b4373aa56ee7.tar.gz tor-ebd4ab1506517b32ee3bd5bd1597b4373aa56ee7.zip |
Prepare patch for ticket 5129 for merging.
- Preserve old eventdns code.
- Add function to close sockets cross-platform, without accounting.
- Add changes/ file.
Diffstat (limited to 'src/common/compat.h')
-rw-r--r-- | src/common/compat.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/common/compat.h b/src/common/compat.h index 258fc99020..89a5d7ffbe 100644 --- a/src/common/compat.h +++ b/src/common/compat.h @@ -450,10 +450,22 @@ typedef int socklen_t; #define TOR_INVALID_SOCKET (-1) #endif +int tor_close_socket_simple(tor_socket_t s); int tor_close_socket(tor_socket_t s); +tor_socket_t tor_open_socket_with_extensions( + int domain, int type, int protocol, + int cloexec, int nonblock); tor_socket_t tor_open_socket(int domain, int type, int protocol); +tor_socket_t tor_open_socket_nonblocking(int domain, int type, int protocol); tor_socket_t tor_accept_socket(tor_socket_t sockfd, struct sockaddr *addr, socklen_t *len); +tor_socket_t tor_accept_socket_nonblocking(tor_socket_t sockfd, + struct sockaddr *addr, + socklen_t *len); +tor_socket_t tor_accept_socket_with_extensions(tor_socket_t sockfd, + struct sockaddr *addr, + socklen_t *len, + int cloexec, int nonblock); int get_n_open_sockets(void); #define tor_socket_send(s, buf, len, flags) send(s, buf, len, flags) |