Imported Upstream version 7.59.0
[platform/upstream/curl.git] / docs / libcurl / opts / CURLOPT_ABSTRACT_UNIX_SOCKET.3
1 .\" **************************************************************************
2 .\" *                                  _   _ ____  _
3 .\" *  Project                     ___| | | |  _ \| |
4 .\" *                             / __| | | | |_) | |
5 .\" *                            | (__| |_| |  _ <| |___
6 .\" *                             \___|\___/|_| \_\_____|
7 .\" *
8 .\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
9 .\" *
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.
13 .\" *
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.
17 .\" *
18 .\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19 .\" * KIND, either express or implied.
20 .\" *
21 .\" **************************************************************************
22 .\"
23 .TH CURLOPT_ABSTRACT_UNIX_SOCKET 3 "January 09, 2017" "libcurl 7.59.0" "curl_easy_setopt options"
24
25 .SH NAME
26 CURLOPT_ABSTRACT_UNIX_SOCKET \- set an abstract Unix domain socket
27 .SH SYNOPSIS
28 #include <curl/curl.h>
29
30 CURLcode curl_easy_setopt(CURL *handle, CURLOPT_ABSTRACT_UNIX_SOCKET, char *path);
31 .SH DESCRIPTION
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).
37
38 On non-supporting platforms, the abstract address will be interpreted as an empty
39 string and fail gracefully, generating a run-time error.
40
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.
45
46 .SH DEFAULT
47 Default is NULL.
48 .SH EXAMPLE
49 .nf
50     curl_easy_setopt(curl_handle, CURLOPT_ABSTRACT_UNIX_SOCKET, "/tmp/foo.sock");
51     curl_easy_setopt(curl_handle, CURLOPT_URL, "http://localhost/");
52 .fi
53
54 .SH AVAILABILITY
55 Since 7.53.0.
56 .SH RETURN VALUE
57 Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
58 .SH "SEE ALSO"
59 .BR CURLOPT_UNIX_SOCKET_PATH "(3), " unix "(7), "