1CURLOPT_ABSTRACT_UNIX_SOCKETc(u3r)l_easy_setopt optiCoUnRsLOPT_ABSTRACT_UNIX_SOCKET(3)
2
3
4
6 CURLOPT_ABSTRACT_UNIX_SOCKET - set an abstract Unix domain socket
7
9 #include <curl/curl.h>
10
11 CURLcode curl_easy_setopt(CURL *handle, CURLOPT_ABSTRACT_UNIX_SOCKET,
12 char *path);
13
15 Enables the use of an abstract Unix domain socket instead of establishâ
16 ing a TCP connection to a host. The parameter should be a char * to a
17 zero terminated string holding the path of the socket. The path will be
18 set to path prefixed by a NULL byte (this is the convention for
19 abstract sockets, however it should be stressed that the path passed to
20 this function should not contain a leading NULL).
21
22 On non-supporting platforms, the abstract address will be interpreted
23 as an empty string and fail gracefully, generating a run-time error.
24
25 This option shares the same semantics as CURLOPT_UNIX_SOCKET_PATH(3) in
26 which documentation more details can be found. Internally, these two
27 options share the same storage and therefore only one of them can be
28 set per handle.
29
30
32 Default is NULL.
33
35 curl_easy_setopt(curl_handle, CURLOPT_ABSTRACT_UNIX_SOCKET, "/tmp/foo.sock");
36 curl_easy_setopt(curl_handle, CURLOPT_URL, "http://localhost/");
37
38
40 Since 7.53.0.
41
43 Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION
44 if not.
45
47 CURLOPT_UNIX_SOCKET_PATH(3), unix(7),
48
49
50
51libcurl 7.64.0 January 09, 2017CURLOPT_ABSTRACT_UNIX_SOCKET(3)