CURLOPT_ABSTRACT_UNIX_SOCKET.3 2.5 KB

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