mirror of
https://github.com/curl/curl.git
synced 2026-08-24 18:13:32 +03:00
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>
This commit is contained in:
parent
fb7d7e0022
commit
e9c7a86220
2 changed files with 61 additions and 1 deletions
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue