diff options
author | Peter Wu <peter@lekensteyn.nl> | 2014-12-03 02:20:00 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2014-12-04 02:52:18 +0100 |
commit | e9c7a86220ddf4e67b8bff56cddfc7388afcc9ef (patch) | |
tree | 3109856a6a63743449186bd7ae06eb9b4463c277 /tests/server/server_sockaddr.h | |
parent | fb7d7e0022f22035449bbc506068004f0568f8ae (diff) | |
download | curl-e9c7a86220ddf4e67b8bff56cddfc7388afcc9ef.tar.gz |
sws: add UNIX domain socket support
This extends sws with a --unix-socket option which causes the port to
be ignored (as the server now listens on the path specified by
--unix-socket). This feature will be available in the following patch
that enables checking for UNIX domain socket support.
Proxy support (CONNECT) is not considered nor tested. It does not make
sense anyway, first connecting through a TCP proxy, then let that TCP
proxy connect to a UNIX socket.
Signed-off-by: Peter Wu <peter@lekensteyn.nl>
Diffstat (limited to 'tests/server/server_sockaddr.h')
-rw-r--r-- | tests/server/server_sockaddr.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/server/server_sockaddr.h b/tests/server/server_sockaddr.h index 6a17fe007..3f4cd67d7 100644 --- a/tests/server/server_sockaddr.h +++ b/tests/server/server_sockaddr.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -23,12 +23,19 @@ ***************************************************************************/ #include "server_setup.h" +#ifdef HAVE_SYS_UN_H +#include <sys/un.h> /* for sockaddr_un */ +#endif + typedef union { struct sockaddr sa; struct sockaddr_in sa4; #ifdef ENABLE_IPV6 struct sockaddr_in6 sa6; #endif +#ifdef USE_UNIX_SOCKETS + struct sockaddr_un sau; +#endif } srvr_sockaddr_union_t; #endif /* HEADER_CURL_SERVER_SOCKADDR_H */ |