Imported Upstream version 7.53.1
[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 "08 Jan 2017" "libcurl 7.53.0" "curl_easy_setopt options"
24 .SH NAME
25 CURLOPT_ABSTRACT_UNIX_SOCKET \- set an abstract Unix domain socket
26 .SH SYNOPSIS
27 #include <curl/curl.h>
28
29 CURLcode curl_easy_setopt(CURL *handle, CURLOPT_ABSTRACT_UNIX_SOCKET, char *path);
30 .SH DESCRIPTION
31 Enables the use of an abstract Unix domain socket instead of establishing a TCP
32 connection to a host. The parameter should be a char * to a zero terminated string
33 holding the path of the socket. The path will be set to \fIpath\fP prefixed by a
34 NULL byte (this is the convention for abstract sockets, however it should be stressed
35 that the path passed to this function should not contain a leading NULL).
36
37 On non-supporting platforms, the abstract address will be interpreted as an empty
38 string and fail gracefully, generating a run-time error.
39
40 This option shares the same semantics as
41 .BR CURLOPT_UNIX_SOCKET_PATH "(3)
42 in which documentation more details can be found. Internally, these two options share
43 the same storage and therefore only one of them can be set per handle.
44
45 .SH DEFAULT
46 Default is NULL.
47 .SH EXAMPLE
48 .nf
49     curl_easy_setopt(curl_handle, CURLOPT_ABSTRACT_UNIX_SOCKET, "/tmp/foo.sock");
50     curl_easy_setopt(curl_handle, CURLOPT_URL, "http://localhost/");
51 .fi
52
53 .SH AVAILABILITY
54 Since 7.53.0.
55 .SH RETURN VALUE
56 Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
57 .SH "SEE ALSO"
58 .BR CURLOPT_UNIX_SOCKET_PATH "(3), " unix "(7), "