1 .\" **************************************************************************
3 .\" * Project ___| | | | _ \| |
4 .\" * / __| | | | |_) | |
5 .\" * | (__| |_| | _ <| |___
6 .\" * \___|\___/|_| \_\_____|
8 .\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
10 .\" * This software is licensed as described in the file COPYING, which
11 .\" * you should have received as part of this distribution. The terms
12 .\" * are also available at https://curl.haxx.se/docs/copyright.html.
14 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
15 .\" * copies of the Software, and permit persons to whom the Software is
16 .\" * furnished to do so, under the terms of the COPYING file.
18 .\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19 .\" * KIND, either express or implied.
21 .\" **************************************************************************
23 .TH CURLOPT_ABSTRACT_UNIX_SOCKET 3 "January 09, 2017" "libcurl 7.59.0" "curl_easy_setopt options"
26 CURLOPT_ABSTRACT_UNIX_SOCKET \- set an abstract Unix domain socket
28 #include <curl/curl.h>
30 CURLcode curl_easy_setopt(CURL *handle, CURLOPT_ABSTRACT_UNIX_SOCKET, char *path);
32 Enables the use of an abstract Unix domain socket instead of establishing a TCP
33 connection to a host. The parameter should be a char * to a zero terminated string
34 holding the path of the socket. The path will be set to \fIpath\fP prefixed by a
35 NULL byte (this is the convention for abstract sockets, however it should be stressed
36 that the path passed to this function should not contain a leading NULL).
38 On non-supporting platforms, the abstract address will be interpreted as an empty
39 string and fail gracefully, generating a run-time error.
41 This option shares the same semantics as
42 .BR CURLOPT_UNIX_SOCKET_PATH "(3)
43 in which documentation more details can be found. Internally, these two options share
44 the same storage and therefore only one of them can be set per handle.
50 curl_easy_setopt(curl_handle, CURLOPT_ABSTRACT_UNIX_SOCKET, "/tmp/foo.sock");
51 curl_easy_setopt(curl_handle, CURLOPT_URL, "http://localhost/");
57 Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
59 .BR CURLOPT_UNIX_SOCKET_PATH "(3), " unix "(7), "